curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #00874
[Merge] ~freddierice/curtin:mdadm-metadata into curtin:master
Freddie Rice has proposed merging ~freddierice/curtin:mdadm-metadata into curtin:master.
Commit message:
block_meta: pass the metadata parameter into the mdadm_create function
Requested reviews:
curtin developers (curtin-dev)
For more details, see:
https://code.launchpad.net/~freddierice/curtin/+git/curtin/+merge/391296
Changing 'metadata' in raid right now is a nop because it is never passed into the mdadm_create function. This change aims to allow the metadata parameter to be passed into the mdadm call.
--
Your team curtin developers is requested to review the proposed merge of ~freddierice/curtin:mdadm-metadata into curtin:master.
diff --git a/curtin/commands/block_meta.py b/curtin/commands/block_meta.py
index dee73b1..424f3d3 100644
--- a/curtin/commands/block_meta.py
+++ b/curtin/commands/block_meta.py
@@ -1518,7 +1518,8 @@ def raid_handler(info, storage_config):
if create_raid:
mdadm.mdadm_create(md_devname, raidlevel,
device_paths, spare_device_paths,
- info.get('mdname', ''))
+ info.get('mdname', ''),
+ metadata=info.get('metadata'))
wipe_mode = info.get('wipe')
if wipe_mode:
diff --git a/tests/unittests/test_commands_block_meta.py b/tests/unittests/test_commands_block_meta.py
index d954296..c9a340b 100644
--- a/tests/unittests/test_commands_block_meta.py
+++ b/tests/unittests/test_commands_block_meta.py
@@ -1892,7 +1892,7 @@ class TestRaidHandler(CiTestCase):
self.m_getpath.side_effect = iter(devices)
block_meta.raid_handler(self.storage_config['mddevice'],
self.storage_config)
- self.assertEqual([call(md_devname, 5, devices, [], '')],
+ self.assertEqual([call(md_devname, 5, devices, [], '', metadata=None)],
self.m_mdadm.mdadm_create.call_args_list)
@patch('curtin.commands.block_meta.raid_verify')
Follow ups