Lxd storage #6996

Merged
merged 6 commits into from Feb 17, 2017

Conversation

Projects
None yet
4 participants
Contributor

tych0 commented Feb 16, 2017

LXD has a new storage API in 2.9 (which will not be backported to xenial, it'll be trusty only). However, juju will fail to create containers without this, as LXD 2.9 does not have a default storage pool any more.

This also includes some forward porting of juju's client code to deal with some API refactoring we've done.

ping @wallyworld @howbazaar about whether this should go in 2.1

Tycho Andersen added some commits Feb 16, 2017

lxd: bump version to 2.9
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
make juju compile with new LXD API changes
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
fix provider/lxd tests for new LXD api
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
fix tools/lxdclient tests for new lxd api
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
lxd: update LXD for 2.9's new storage API
This is basically the same thing as the network API update commit, although
it is somewhat easier to deal with:

LXD 2.9 has a storage API (indicated by the "storage" API extension), and
now users must configure a default storage pool. This simply adds code that
detects whether there is a storage pool configured and in the default
profile. If there is, and it's in the profile, then this code is a no-op.

Otherwise, it creates a storage pool (using the directory backend; it looks
like all the ZFS code got ripped out and I assume there's a reason for
that), and attaches that storage pool to the default profile so that
containers will use it as their pool for root disks.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
fix go fmt
Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>

Code looks good to me.
Description is wrong, you at least want s/trusty/zesty/ in there :)

To be clear, LXD 2.9 as a deb is going to hit zesty, then be made available in xenial-backports and yakkety-backports which I don't believe Juju uses/cares about.

The LXD snap is also always the latest feature release and so will be 2.9 as of tomorrow (it's in the candidate channel right now), again, I don't think Juju cares about the LXD snap just yet.

Contributor

tych0 commented Feb 16, 2017

Yeah, sorry. The commit message looks good, but the PR comment is not. derp

axw approved these changes Feb 16, 2017

Code LGTM. Looks safe for 2.1, but I'll let one of the others weigh in on that.

Member

axw commented Feb 17, 2017

$$merge$$

Contributor

jujubot commented Feb 17, 2017

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

@jujubot jujubot merged commit c5b01a5 into juju:develop Feb 17, 2017

1 check passed

github-check-merge-juju Built PR, ran unit tests, and tested LXD deploy. Use !!.*!! to request another build. IE, !!build!!, !!retry!!
Details

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

Merge pull request #6999 from wallyworld/backport-pr-6996
Backport LXD 2.9 support


## Description of change

Backport PR #6996 which was merged into develop

## QA steps

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