Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Drop lxd-storage feature flag #7635
Conversation
| @@ -165,6 +165,11 @@ func (env *environ) Destroy() error { | ||
| return errors.Trace(err) | ||
| } | ||
| } | ||
| + if env.storageSupported() { | ||
| + if err := destroyModelFilesystems(env); err != nil { | ||
| + return errors.Annotate(err, "destroying LXD volumes for model") |
wallyworld
Jul 13, 2017
Owner
"LXD filesystems" maybe?
The underlying artefact may be an LXD volume but we're presenting to the user a Juju filesystem storage?
| } | ||
| - return &lxdFilesystemSource{e.env, lxdStorageConfig}, nil | ||
| + err = env.raw.CreateStoragePool(cfg.lxdPool, cfg.driver, cfg.attrs) |
axw
Jul 13, 2017
Member
It's not, but (a) there's no special error code, and (b) we check for existence above
axw
Jul 13, 2017
Member
I've changed things a bit so that we make the CreateStoragePool call first, then if it fails we check if the pool already exists. If it does not exist, then we return the original error.
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
jujubot
merged commit d07880c
into
juju:develop
Jul 13, 2017
1 check passed
github-check-merge-juju
Ran tests against PR. Use !!.*!! to request another build. IE, !!build!!, !!retry!!
Details
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
axw commentedJul 13, 2017
Description of change
Tidy up the lxd storage provider, and drop the feature flag.
This PR makes the "lxd" storage provider usable for creating
model-level filesystems. This provider does not support
block storage. The filesystems can be dynamically created,
destroyed, attached, and detached.
Using the "lxd" storage pool (i.e. without configuration),
storage will be allocated from the LXD storage pool called
"juju", using the driver "dir". The provider also predefines
a "lxd-zfs" storage pool, which maps to the LXD storage pool
called "juju-zfs", using a zfs pool of the same name. Juju
will create the LXD storage pools as necessary, and will
ensure that they have the same configuration before use.
QA steps
Confirm that the machine comes up, and postgresql deploys successfully. Using "lxd storage list juju", you should be able to see the volume created by Juju. Then, opening a terminal in the container, you should be able to see that volume mounted at /srv/pgdata, with the postgresql database stored within it.
Documentation changes
Yes, we should update the storage docs to refer to this new storage provider.
Bug reference
None.