Storage vs. PublicStorage
Ian Booth
ian.booth at canonical.com
Tue Mar 12 06:10:48 UTC 2013
On Tue 12 Mar 2013 15:54:51 EST, Jeroen Vermeulen wrote:
> On 03/12/2013 12:07 PM, Ian Booth wrote:
>
>> It's possible to run up an Openstack juju environment without a public bucket,
>> but in that case you need to have uploaded the tools to the control bucket
>> before hand. But that's just a provider implementation detail. If you don't want
>> to use public bucket for the MAAS provider, then just don't bother setting it.
>> The tools code will just ignore it if it is not set.
>
> Is there even such a thing as a bucket outside of the ec2/openstack
> providers?
>
EC2 = bucket, Openstack = container.
The providers need to provide the concept which allows namespaced file storage
areas. The so called control bucket/container/whatever is used to store a file
representing the provider state and other shared information for a particular
environment. The public "thing" is used as a means to share access to the tools
tarball and mongo tarball. I guess local provider would use a directory, not
sure about MAAS - does if even have the concept of a namespaced file container?
> PublicStorage() used to be documented as optional, but it no longer
> seems to be. We tried implementing a PublicStorage() that just returns
> nil, but in our test, that made Bootstrap() crash during findMongo().
> Returning the same storage object from Storage() and PublicStorage()
> does get us past that.
Now, currently, if there is no public bucket, findMongo is supposed to check in
order:
1. provider control bucket
2. provider public bucket
3. well known EC2 public bucket
If an error occurs when checking a bucket, it moves on to the next in the list.
The Openstack provider doesn't return nil, but does return environs.EmptyStorage
if no public bucket is specified (sorry, I misremembered). A quick read of the
code seems to indicate that nil should have worked also, but clearly not if you
got an error. So try returning environs.EmptyStorage in your provider's
PublicStorage() method and see if findMongo still errors.
More information about the Juju-dev
mailing list