Merge lp:~paelzer/curtin/minor-mdadm-fs-fixes into lp:~curtin-dev/curtin/trunk

Proposed by Christian Ehrhardt 
Status: Merged
Merged at revision: 283
Proposed branch: lp:~paelzer/curtin/minor-mdadm-fs-fixes
Merge into: lp:~curtin-dev/curtin/trunk
Diff against target: 26 lines (+6/-2)
1 file modified
curtin/commands/block_meta.py (+6/-2)
To merge this branch: bzr merge lp:~paelzer/curtin/minor-mdadm-fs-fixes
Reviewer Review Type Date Requested Status
curtin developers Pending
Review via email: mp+274309@code.launchpad.net

Description of the change

Minor fixes that came up when testing various mdadm options and filesystems.

To post a comment you must log in.
Revision history for this message
Scott Moser (smoser) wrote :

i'm gonna pull this.

Revision history for this message
Scott Moser (smoser) wrote :

actually, this was part of reno 283 pull.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'curtin/commands/block_meta.py'
2--- curtin/commands/block_meta.py 2015-10-02 18:30:42 +0000
3+++ curtin/commands/block_meta.py 2015-10-13 19:17:09 +0000
4@@ -36,7 +36,7 @@
5 SIMPLE_BOOT = 'simple-boot'
6 CUSTOM = 'custom'
7
8-CUSTOM_REQUIRED_PACKAGES = ['mdadm', 'lvm2', 'bcache-tools']
9+CUSTOM_REQUIRED_PACKAGES = ['mdadm', 'lvm2', 'bcache-tools', 'xfsprogs', 'btrfs-tools']
10
11 CMD_ARGUMENTS = (
12 ((('-D', '--devices'),
13@@ -812,8 +812,12 @@
14 spare_devices = info.get('spare_devices')
15 if not devices:
16 raise ValueError("devices for raid must be specified")
17- if raidlevel not in [0, 1, 5]:
18+ if raidlevel not in ['linear', 'raid0', 0, 'stripe', 'raid1', 1, 'mirror',
19+ 'raid4', 4, 'raid5', 5, 'raid6', 6, 'raid10', 10]:
20 raise ValueError("invalid raidlevel '%s'" % raidlevel)
21+ if raidlevel in ['linear', 'raid0', 0, 'stripe']:
22+ if spare_devices:
23+ raise ValueError("spares unsupported in raidlevel '%s'" % raidlevel)
24
25 device_paths = list(get_path_to_storage_volume(dev, storage_config) for
26 dev in devices)

Subscribers

People subscribed via source and target branches