Commit Graph

10 Commits

Author SHA1 Message Date
Alex Kavanagh 4bf72620c3 Fix detection of already initialised lxc storage pool
The related bug was caused because the charm did not detect when
the lxc storage had already been set up using the `lxc storage`
command which is used in the 3.x series, rather than the old way
with the 2.x series.

Also fixes issue on xenial where linux-image-extra-* has been renamed to
linux-modules-extra-* from from -4.4.0-145-generic onwards.  Otherwise,
the install fails on xenial.

Change-Id: If8bdad6f5641ee21fc7860dceeb4c3facbaecc76
Closes-Bug: #1825393
2019-04-23 21:35:42 +01:00
Ryan Beisner 7b9ed48f9e
Fix lint in unit tests re: py3-first and py2 compat
Change-Id: Icdcbeaffac1b001dcffbbf9376ef2b90c373f170
2018-11-01 22:39:54 -05:00
James Page f0773c9952 Increase subuid/subgid range for root user
To support use of distinct subuid/subgid ranges per LXD container,
the default range for the root user must be increased to support
> 1 running container in this configuration.

Increase subuid/subgid range to support 5000 containers with distinct
ranges.  Restart LXD daemon if idmap configuration changes, to ensure
that the full range of subid's are used.

Change-Id: I8b87dad736abaffdbd7afac090429790d3b03c96
Closes-Bug: 1648056
2016-12-07 15:24:49 +00:00
James Page b48bf6c604 Add support for application version
Juju 2.0 provides support for display of the version of
an application deployed by a charm in juju status.

Insert the application_version_set function into the
existing assess_status function - this gets called after
all hook executions, and periodically after that, so any
changes in package versions due to normal system updates
will also be reflected in the status output.

This review also includes a resync of charm-helpers to
pickup hookenv support for this feature.

Change-Id: Iecfdb372e21d1e23cefaa5f972008fc34d65b143
2016-09-21 10:30:19 +01:00
James Page 4698744a59 Re-license charm as Apache-2.0
All contributions to this charm where made under Canonical
copyright; switch to Apache-2.0 license as agreed so we
can move forward with official project status.

Change-Id: I2ae8c26a2a486ac39ee386d2c0ff96ef186edf86
2016-07-01 17:30:16 +01:00
Chuck Short abc021285c Ensure ZFS pool management is idempotent
As block device configuration is called from the
config-changed hook, it's vital that the code for
managing the zfs pool is idempotent.

Add a helper to query pool information and ensure
that the ZFS pool does not already exist before
attempting creation.

Change-Id: I4f4ad9c4cdb73b77e8b3a9367b81ec1566bacd59
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2016-04-20 21:32:46 +01:00
Paul Hummer 0e87f8dff4 Rename block-device -> block-devices
Add support for block-devices, but still only accept one block device.

Add tests for parsing the device block list.

Change-Id: I78fe3b9e617a7da75145a2695bee312cf3685246
2016-04-18 21:21:48 +01:00
Paul Hummer d9b7157396 Add support for zfs in the charm.
Change-Id: I6df55aee1c814ba44a30ac73a48ce95073e1a4ad
2016-04-12 12:32:07 -06:00
Paul Hummer 2b42780d52 Fix lxd thinpool creation.
Force creation of the lxd thinpool.
Re-enable lvm tests.
Ignore charm temp and pyc files.

Change-Id: I8887f3231e789ab58c548ba583740035151097aa

Fix lxd thinpool creation.

Force creation of the lxd thinpool.
Re-enable lvm tests.
Ignore charm temp and pyc files.

Change-Id: I8887f3231e789ab58c548ba583740035151097aa

Add simplejson to requirements.

Change-Id: I2bc3992a020892fbd5af139f538d6e2069496ef2

Add unit tests

Change-Id: Iaeaa554eb05e2dd015ea699741a3d4d378e7dbc1

Fix lint.

Change-Id: I5e8a2b94ed434cf5338eb3925cd3a7342cc85360

Unify both Makefile and tox calls.

Change-Id: I0c8b35e5d777ea221a34521a258e26c4029fdccd
2016-03-23 14:41:04 -06:00
Ryan Beisner 0273d22e02 add NotImplemented unit_tests 2016-01-28 21:08:32 +00:00