On Sat, Feb 6, 2016 at 2:30 AM Marco Ceppi <[email protected]> wrote:
> This sounds very promising! Will play around with it a bit more. > > On Fri, Feb 5, 2016, 7:16 PM Mark Shuttleworth <[email protected]> wrote: > >> On 05/02/16 17:47, Marco Ceppi wrote: >> > Does this require the operator to add storage at deploy time? Does this >> > mean our charm should block until storage is added? We really want to be >> > able to support the /option/ or adding storage by the operator but we're >> > not sure how this functions. If we use that directory before the >> operator >> > attaches storage will it be mounted over or migrated? >> >> AIUI: >> >> * you can leave the storage unspecified and it will just write to the >> directory >> * you cannot change the storage pool after deployment >> > Correct on both counts. If you don't specify storage, Juju will just create "/srv/hdfs" on the root filesystem, and you cannot change this after deployment. Furthermore: the charm's install hook will not fire until the storage is available and attached (which means "-storage-attached" hooks will fire before "install"). So you know, at charm install time, the storage is there; no need to block, Juju is doing that for you. It's worth noting that it is also possible to make make storage optional by setting the minimum number of storage instances to 0, like so: storage: hdfs-data: type: filesystem location: /srv/hdfs multiple: range: 0-1 If you deploy such a charm without specifying a storage directive, you will get no storage. If you do want the storage, you either deploy with --storage, or use "juju storage add" (juju add-storage in 2.0, I believe). IIRC, if the specified location already exists, and is non-empty, Juju will refuse to mount the storage over the top. Cheers, Andrew Mark >> > -- > Juju-dev mailing list > [email protected] > Modify settings or unsubscribe at: > https://lists.ubuntu.com/mailman/listinfo/juju-dev >
-- Juju-dev mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/juju-dev
