Merge lp:~zulcss/charms/trusty/lxd/lxd-zfs into lp:~openstack-charmers-archive/charms/trusty/lxd/next

Proposed by Chuck Short
Status: Work in progress
Proposed branch: lp:~zulcss/charms/trusty/lxd/lxd-zfs
Merge into: lp:~openstack-charmers-archive/charms/trusty/lxd/next
Diff against target: 25 lines (+15/-0)
1 file modified
hooks/lxd_utils.py (+15/-0)
To merge this branch: bzr merge lp:~zulcss/charms/trusty/lxd/lxd-zfs
Reviewer Review Type Date Requested Status
James Page Needs Fixing
Review via email: mp+286702@code.launchpad.net

Description of the change

Add zfs support

To post a comment you must log in.
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #829 lxd-next for zulcss mp286702
    UNIT FAIL: unit-test failed

UNIT Results (max last 2 lines):
make: *** [test] Error 1
ERROR:root:Make target returned non-zero.

Full unit test output: http://paste.ubuntu.com/
Build: http://10.245.162.36:8080/job/charm_unit_test/829/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #931 lxd-next for zulcss mp286702
    LINT FAIL: lint-test failed

LINT Results (max last 2 lines):
make: *** [lint] Error 1
ERROR:root:Make target returned non-zero.

Full lint test output: http://paste.ubuntu.com/
Build: http://10.245.162.36:8080/job/charm_lint_check/931/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #375 lxd-next for zulcss mp286702
    AMULET FAIL: amulet-test failed

AMULET Results (max last 2 lines):
make: *** [functional_test] Error 1
ERROR:root:Make target returned non-zero.

Full amulet test output: http://paste.ubuntu.com/
Build: http://10.245.162.36:8080/job/charm_amulet_test/375/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #474 lxd-next for zulcss mp286702
    AMULET OK: passed

Build: http://10.245.162.36:8080/job/charm_amulet_test/474/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #475 lxd-next for zulcss mp286702
    AMULET OK: passed

Build: http://10.245.162.36:8080/job/charm_amulet_test/475/

lp:~zulcss/charms/trusty/lxd/lxd-zfs updated
52. By Chuck Short

Fix lint

Revision history for this message
Chuck Short (zulcss) wrote :

@recheck

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_unit_test #1233 lxd-next for zulcss mp286702
    UNIT FAIL: unit-test failed

UNIT Results (max last 2 lines):
make: *** [test] Error 1
ERROR:root:Make target returned non-zero.

Full unit test output: http://paste.ubuntu.com/15198716/
Build: http://10.245.162.36:8080/job/charm_unit_test/1233/

Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_lint_check #1478 lxd-next for zulcss mp286702
    LINT OK: passed

Build: http://10.245.162.36:8080/job/charm_lint_check/1478/

Revision history for this message
James Page (james-page) wrote :

Two in-line comments and some other things to fix:

1) the other storage config options are idempotent (i.e. run the same code twice, it dtrt) - not true for zfs as there is no check to see if dev is already configured as a zfs pool device.

I'd suggest that you either use the kv store to set a flag saying 'configured' or query zfs and determine what needs to be done.

2) please add some docs to the config.yaml including the fact that zfs is >= 16.04.

review: Needs Fixing
Revision history for this message
uosci-testing-bot (uosci-testing-bot) wrote :

charm_amulet_test #533 lxd-next for zulcss mp286702
    AMULET OK: passed

Build: http://10.245.162.36:8080/job/charm_amulet_test/533/

Unmerged revisions

52. By Chuck Short

Fix lint

51. By Chuck Short

Add zfs support

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'hooks/lxd_utils.py'
2--- hooks/lxd_utils.py 2015-10-20 10:13:31 +0000
3+++ hooks/lxd_utils.py 2016-02-25 16:10:44 +0000
4@@ -203,6 +203,21 @@
5 create_lvm_volume_group('lxd_vg', dev)
6 cmd = ['lxc', 'config', 'set', 'storage.lvm_vg_name', 'lxd_vg']
7 check_call(cmd)
8+ elif config('storage-type') == 'zfs':
9+ if lsb_release()['DISTRIB_CODENAME'].lower() < "xenial":
10+ raise Exception("zfs is not supported for Ubuntu "
11+ "versions less than 16.04 (xenial)")
12+
13+ status_set('maintenance',
14+ 'Configuring ZFS container storage')
15+ cmd = ['apt', 'install', '-y', 'zfsutils-linux']
16+ check_call(cmd)
17+ cmd = ['modprobe', 'zfs']
18+ check_call(cmd)
19+ cmd = ['zpool', 'create', '-f', 'lxd_zfs', dev]
20+ check_call(cmd)
21+ cmd = ['lxc', 'config', 'set', 'storage.zfs_pool_name', 'lxd_zfs']
22+ check_call(cmd)
23
24
25 def determine_packages():

Subscribers

People subscribed via source and target branches