cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastien Goasguen <run...@gmail.com>
Subject Re: S3 use with simulator
Date Mon, 23 Jun 2014 10:35:28 GMT
Hi Koushik, thanks for the hint, I checked out 4.4-forward and made that small change.

I still add the same error:

> update cloudtouseobjectstore url=http://localhost:9081/riak-cs name=riakcs provider=s3
details[0].key=accesskey details[0].value=ZMJD6-90S2MST4NZMK1Z details[1].key=secretkey details[1].value=ecJlaZebrYKj_qYaIfzlRR_1izojGVWjBRFx0Q==
530: Failed to add data store: DataCenter id is null, and simulator image store has to be
associated with a data center

However this actually *removed* the NFS store (from the simulated basic zone).

I was then able to add:

> add imagestore name=riakcs provider=S3 url=http://localhost:9081/riak-cs details[0].key=accesskey
details[0].value=ZMJD6-90S2MST4NZMK1Z details[1].key=secretkey details[1].value=ecJlaZebrYKj_qYaIfzlRR_1izojGVWjBRFx0Q==
imagestore:
name = riakcs
id = 1a60d62a-c1e9-4d1c-8b35-d5cd687f6de4
details:
+-----------+------------------------------------------+
|    name   |                  value                   |
+-----------+------------------------------------------+
| secretkey | ecJlaZebrYKj_qYaIfzlRR_1izojGVWjBRFx0Q== |
| accesskey |           ZMJD6-90S2MST4NZMK1Z           |
+-----------+------------------------------------------+
protocol = http
providername = S3
scope = REGION
url = http://localhost:9081/riak-cs

Apparently successfully, even though the removal of the NFS store entirely is a bit worrisome.

On Jun 23, 2014, at 4:32 AM, Koushik Das <koushik.das@citrix.com> wrote:

> The error message is from the simulator storage plugin, not sure why you are getting
it even after setting provider types as S3.
> I tried the same on a 4.4-forward setup and got a different error (as below).
> "You can only add new image stores from the same provider NFS already added"
> 
> This error is there as the simulator storage provider doesn't support migration to object
store. Once I fixed it, the image store got added successfully and the NFS store was converted
to a cache store.
> This is the change I made
> 
> diff --git a/plugins/hypervisors/simulator/src/org/apache/cloudstack/storage/datastore/lifecycle/SimulatorImageStoreLifeCycleImpl.java
b/plugins/hypervisors/simulator/src/org/apache/cloudstack/storage/datastore/lifecycle/SimulatorImageStoreLifeCycleImpl.java
> index edf1e28..537c7bd 100644
> --- a/plugins/hypervisors/simulator/src/org/apache/cloudstack/storage/datastore/lifecycle/SimulatorImageStoreLifeCycleImpl.java
> +++ b/plugins/hypervisors/simulator/src/org/apache/cloudstack/storage/datastore/lifecycle/SimulatorImageStoreLifeCycleImpl.java
> @@ -133,7 +133,7 @@ public class SimulatorImageStoreLifeCycleImpl implements ImageStoreLifeCycle
{
>      */
>     @Override
>     public boolean migrateToObjectStore(DataStore store) {
> -        return false;
> +        return imageStoreHelper.convertToStagingStore(store);
>     }
> 
> }
> 
> -----Original Message-----
> From: Min Chen [mailto:min.chen@citrix.com] 
> Sent: Saturday, 21 June 2014 3:44 AM
> To: dev@cloudstack.apache.org
> Subject: Re: S3 use with simulator
> 
> Got it. The error seems from simulator, maybe Koushik has better idea on that. I didn't
use that on simulator env though.
> 
> Thanks
> -min
> 
> On 6/20/14 11:05 AM, "Sebastien Goasguen" <runseb@gmail.com> wrote:
> 
>> I already have an Nsf secondary storage. I understood that i could not 
>> add a second secondary storage that is s3 based, and that the only way 
>> was to use the updatecloud.... Api
>> 
>> -Sebastien
>> 
>>> On 20 Jun 2014, at 18:49, Min Chen <min.chen@citrix.com> wrote:
>>> 
>>> Hi Sebastien,
>>> 
>>>   I am curious why you are using updateCloudToUseObjectStore api to 
>>> add S3  as a secondary store in your data center? To set up a data 
>>> center using  S3, you need to use addImageStore api.
>>> 
>>>   Thanks
>>>   -min
>>> 
>>>> On 6/20/14 7:47 AM, "Sebastien Goasguen" <runseb@gmail.com> wrote:
>>>> 
>>>> I switch to provider=S3 but I get:
>>>> 
>>>>> 530: Failed to add data store: DataCenter id is null, and simulator 
>>>>> image store has to be associated with a data center
>>>> 
>>>> 
>>>>> On Jun 20, 2014, at 7:07 AM, Koushik Das <koushik.das@citrix.com>
>>>>> wrote:
>>>>> 
>>>>> As per the code the following are the supported image store 
>>>>> provider types
>>>>> 
>>>>>  // constants for provider names
>>>>>  static final String NFS_IMAGE = "NFS";
>>>>>  static final String S3_IMAGE = "S3";
>>>>>  static final String SWIFT_IMAGE = "Swift";
>>>>>  static final String SAMPLE_IMAGE = "Sample";
>>>>>  static final String SMB = "NFS";
>>>>>  static final String DEFAULT_PRIMARY = "DefaultPrimary";
>>>>> 
>>>>> Try passing S3 in the provider.
>>>>> BTW when you setup simulator the image provider is NFS.
>>>>> 
>>>>> -----Original Message-----
>>>>> From: Sebastien Goasguen [mailto:runseb@gmail.com]
>>>>> Sent: Thursday, 19 June 2014 5:08 PM
>>>>> To: dev@cloudstack.apache.org
>>>>> Subject: S3 use with simulator
>>>>> 
>>>>> Hi,
>>>>> 
>>>>> I am using the simulator and started a basic zone.
>>>>> I have an S3 object store locally (riakCS), and I am trying to add 
>>>>> it to the infra using the 'cloudtouseobjectstore' api with cloudmonkey.
>>>>> 
>>>>> I tried with:
>>>>> 
>>>>>> update cloudtouseobjectstore url=http://localhost:9081/riak-cs 
>>>>>> name=riak provider=riakcs
>>>>>> 
>>>>>> details[0].key=accesskey&details[0].value=STU6Z-ZMK1TPMDAXL9I1&deta
>>>>>> ils
>>>>>> [1
>>>>>> 
>>>>>> ].key=secretkey&details[1].value=8OuY3mHDXihu0Tdb2aVJ4vuYZLBAl5Z7Ni
>>>>>> WKs
>>>>>> g=
>>>>>> =
>>>>> 530: Failed to add data store: DataCenter id is null, and simulator 
>>>>> image store has to be associated with a data center
>>>>> 
>>>>> I am not sure if the arguments are right, has anyone done this 
>>>>> before ?
>>>>> 
>>>>> thanks,
>>>>> 
>>>>> -sebastien
>>> 
> 


Mime
View raw message