tools/lxdclient: add support for storage #7026

Merged
merged 1 commit into from Feb 24, 2017

Conversation

Projects
None yet
3 participants
Member

axw commented Feb 23, 2017

Description of change

Add support for managing storage volumes,
and attaching/detaching them to/from
containers. This is required so that we can
implement a LXD storage provider.

QA steps

No functional changes, so just smoke test:

juju bootstrap localhost

Documentation changes

None

Bug reference

None

Looks great! I also like that you're cravenly adding features to juju just to make it easier to do your testing. ;)

tools/lxdclient/instance.go
}
// CurrentStatus returns a string identifying the status of the instance.
-func (gi Instance) CurrentStatus(client *Client) (string, error) {
+func (i *Instance) CurrentStatus(client *Client) (string, error) {
// TODO(ericsnow) Do this a better way?
@babbageclunk

babbageclunk Feb 24, 2017

Member

Do you know what better way he was thinking of? Probably best to delete this.

@axw

axw Feb 24, 2017

Member

That method isn't even used, so I've deleted it.

tools/lxdclient: add support for storage
Add support for managing storage volumes,
and attaching/detaching them to/from
containers.
Member

axw commented Feb 24, 2017

$$merge$$

Contributor

jujubot commented Feb 24, 2017

Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju

@jujubot jujubot merged commit c233f32 into juju:develop Feb 24, 2017

jujubot added a commit that referenced this pull request Feb 24, 2017

Merge pull request #7027 from axw/lxd-storage
provider/lxd: experimental LXD storage provider

## Description of change

Introduce a new "lxd" storage provider that is
enabled with the "lxd-storage" feature flag.
This storage provider requires the storage
feature available in LXD 2.9+.

The first commit in this PR is from #7026, and should be reviewed there.

## QA steps

First create a storage pool in LXD called "lxd".

1. juju bootstrap localhost
2. juju deploy postgresql --pgdata=lxd
Fails with: `ERROR cannot add application "storagetest": pool "lxd" not found` because the feature flag is not set.
3. juju destroy-controller -y localhost

4. export JUJU_DEV_FEATURE_FLAGS=lxd-storage
5. juju bootstrap localhost
6. juju deploy postgresql --pgdata=lxd

Verify there's a volume in the "lxd" LXD storage pool, it's attached to the container, and mounted at the path shown in "juju storage".

## Documentation changes

Not yet. This is experimental, and subject to change.

## Bug reference

None.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment