Merge "Run partx in verbose mode to simplify debugging"
This commit is contained in:
commit
59c02f48cc
@ -234,7 +234,7 @@ class TestImageExtension(base.IronicAgentTest):
|
||||
('', ''), ('', '')])
|
||||
|
||||
expected = [mock.call('efibootmgr', '--version'),
|
||||
mock.call('partx', '-a', '/dev/fake', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/fake', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('mount', self.fake_efi_system_part,
|
||||
@ -281,7 +281,7 @@ class TestImageExtension(base.IronicAgentTest):
|
||||
('', ''), ('', '')])
|
||||
|
||||
expected = [mock.call('efibootmgr', '--version'),
|
||||
mock.call('partx', '-a', '/dev/fake', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/fake', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('mount', self.fake_efi_system_part,
|
||||
@ -337,7 +337,7 @@ Boot0002 VENDMAGIC FvFile(9f3c6294-bf9b-4208-9808-be45dfc34b51)
|
||||
('', ''), ('', '')])
|
||||
|
||||
expected = [mock.call('efibootmgr', '--version'),
|
||||
mock.call('partx', '-a', '/dev/fake', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/fake', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('mount', self.fake_efi_system_part,
|
||||
@ -398,7 +398,7 @@ Boot0004* ironic1 HD(1,GPT,55db8d03-c8f6-4a5b-9155-790dddc348fa,0x800,0x640
|
||||
('', ''), ('', ''),
|
||||
('', ''), ('', '')])
|
||||
expected = [mock.call('efibootmgr', '--version'),
|
||||
mock.call('partx', '-a', '/dev/fake', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/fake', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('mount', self.fake_efi_system_part,
|
||||
@ -450,7 +450,7 @@ Boot0004* ironic1 HD(1,GPT,55db8d03-c8f6-4a5b-9155-790dddc348fa,0x800,0x640
|
||||
('', '')])
|
||||
|
||||
expected = [mock.call('efibootmgr', '--version'),
|
||||
mock.call('partx', '-a', '/dev/fake', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/fake', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('mount', self.fake_efi_system_part,
|
||||
@ -1702,7 +1702,7 @@ Boot0004* ironic1 HD(1,GPT,55db8d03-c8f6-4a5b-9155-790dddc348fa,0x800,0x640
|
||||
efi_system_part_uuid=self.fake_efi_system_part_uuid,
|
||||
target_boot_mode='uefi')
|
||||
|
||||
expected = [mock.call('partx', '-a', '/dev/fake', attempts=3,
|
||||
expected = [mock.call('partx', '-av', '/dev/fake', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('mount', '/dev/fake2', self.fake_dir),
|
||||
|
@ -2563,22 +2563,22 @@ class TestGenericHardwareManager(base.IronicAgentTest):
|
||||
mock.call('sgdisk', '-F', '/dev/sdb'),
|
||||
mock.call('parted', '/dev/sda', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '42s', '10GiB'),
|
||||
mock.call('partx', '-a', '/dev/sda', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sda', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sdb', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '42s', '10GiB'),
|
||||
mock.call('partx', '-a', '/dev/sdb', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sdb', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sda', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '10GiB', '-1'),
|
||||
mock.call('partx', '-a', '/dev/sda', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sda', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sdb', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '10GiB', '-1'),
|
||||
mock.call('partx', '-a', '/dev/sdb', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sdb', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('mdadm', '--create', '/dev/md0', '--force', '--run',
|
||||
@ -2658,32 +2658,32 @@ class TestGenericHardwareManager(base.IronicAgentTest):
|
||||
mock.call('sgdisk', '-F', '/dev/sdc'),
|
||||
mock.call('parted', '/dev/sda', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '42s', '10GiB'),
|
||||
mock.call('partx', '-a', '/dev/sda', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sda', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sdb', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '42s', '10GiB'),
|
||||
mock.call('partx', '-a', '/dev/sdb', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sdb', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sdc', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '42s', '10GiB'),
|
||||
mock.call('partx', '-a', '/dev/sdc', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sdc', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sda', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '10GiB', '-1'),
|
||||
mock.call('partx', '-a', '/dev/sda', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sda', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sdb', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '10GiB', '-1'),
|
||||
mock.call('partx', '-a', '/dev/sdb', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sdb', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sdc', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '10GiB', '-1'),
|
||||
mock.call('partx', '-a', '/dev/sdc', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sdc', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('mdadm', '--create', '/dev/md0', '--force', '--run',
|
||||
@ -2764,42 +2764,42 @@ class TestGenericHardwareManager(base.IronicAgentTest):
|
||||
mock.call('sgdisk', '-F', '/dev/sdd'),
|
||||
mock.call('parted', '/dev/sda', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '42s', '10GiB'),
|
||||
mock.call('partx', '-a', '/dev/sda', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sda', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sdb', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '42s', '10GiB'),
|
||||
mock.call('partx', '-a', '/dev/sdb', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sdb', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sdc', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '42s', '10GiB'),
|
||||
mock.call('partx', '-a', '/dev/sdc', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sdc', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sdd', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '42s', '10GiB'),
|
||||
mock.call('partx', '-a', '/dev/sdd', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sdd', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sda', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '10GiB', '-1'),
|
||||
mock.call('partx', '-a', '/dev/sda', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sda', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sdb', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '10GiB', '-1'),
|
||||
mock.call('partx', '-a', '/dev/sdb', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sdb', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sdc', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '10GiB', '-1'),
|
||||
mock.call('partx', '-a', '/dev/sdc', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sdc', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sdd', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '10GiB', '-1'),
|
||||
mock.call('partx', '-a', '/dev/sdd', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sdd', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('mdadm', '--create', '/dev/md0', '--force', '--run',
|
||||
@ -2865,22 +2865,22 @@ class TestGenericHardwareManager(base.IronicAgentTest):
|
||||
mock.call('parted', '/dev/sdb', '-s', '--', 'mklabel', 'gpt'),
|
||||
mock.call('parted', '/dev/sda', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '551MiB', '10GiB'),
|
||||
mock.call('partx', '-a', '/dev/sda', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sda', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sdb', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '551MiB', '10GiB'),
|
||||
mock.call('partx', '-a', '/dev/sdb', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sdb', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sda', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '10GiB', '-1'),
|
||||
mock.call('partx', '-a', '/dev/sda', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sda', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sdb', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '10GiB', '-1'),
|
||||
mock.call('partx', '-a', '/dev/sdb', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sdb', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('mdadm', '--create', '/dev/md0', '--force', '--run',
|
||||
@ -2952,22 +2952,22 @@ class TestGenericHardwareManager(base.IronicAgentTest):
|
||||
mock.call('parted', '/dev/sdb', '-s', '--', 'mklabel', 'gpt'),
|
||||
mock.call('parted', '/dev/sda', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '8MiB', '10GiB'),
|
||||
mock.call('partx', '-a', '/dev/sda', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sda', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sdb', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '8MiB', '10GiB'),
|
||||
mock.call('partx', '-a', '/dev/sdb', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sdb', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sda', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '10GiB', '-1'),
|
||||
mock.call('partx', '-a', '/dev/sda', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sda', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sdb', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '10GiB', '-1'),
|
||||
mock.call('partx', '-a', '/dev/sdb', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sdb', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('mdadm', '--create', '/dev/md0', '--force', '--run',
|
||||
@ -3034,22 +3034,22 @@ class TestGenericHardwareManager(base.IronicAgentTest):
|
||||
mock.call('sgdisk', '-F', '/dev/sdb'),
|
||||
mock.call('parted', '/dev/sda', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '42s', '10GiB'),
|
||||
mock.call('partx', '-a', '/dev/sda', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sda', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sdb', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '42s', '10GiB'),
|
||||
mock.call('partx', '-a', '/dev/sdb', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sdb', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sda', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '10GiB', '30GiB'),
|
||||
mock.call('partx', '-a', '/dev/sda', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sda', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sdb', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '10GiB', '30GiB'),
|
||||
mock.call('partx', '-a', '/dev/sdb', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sdb', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('mdadm', '--create', '/dev/md0', '--force', '--run',
|
||||
@ -3118,22 +3118,22 @@ class TestGenericHardwareManager(base.IronicAgentTest):
|
||||
mock.call('sgdisk', '-F', '/dev/sdb'),
|
||||
mock.call('parted', '/dev/sda', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '42s', '20GiB'),
|
||||
mock.call('partx', '-a', '/dev/sda', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sda', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sdb', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '42s', '20GiB'),
|
||||
mock.call('partx', '-a', '/dev/sdb', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sdb', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sda', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '20GiB', '-1'),
|
||||
mock.call('partx', '-a', '/dev/sda', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sda', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sdb', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '20GiB', '-1'),
|
||||
mock.call('partx', '-a', '/dev/sdb', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sdb', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('mdadm', '--create', '/dev/md0', '--force', '--run',
|
||||
@ -3211,22 +3211,22 @@ class TestGenericHardwareManager(base.IronicAgentTest):
|
||||
mock.call('sgdisk', '-F', '/dev/sdb'),
|
||||
mock.call('parted', '/dev/sda', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '42s', '10GiB'),
|
||||
mock.call('partx', '-a', '/dev/sda', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sda', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sdb', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '42s', '10GiB'),
|
||||
mock.call('partx', '-a', '/dev/sdb', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sdb', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sda', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '10GiB', '-1'),
|
||||
mock.call('partx', '-a', '/dev/sda', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sda', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/sdb', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '10GiB', '-1'),
|
||||
mock.call('partx', '-a', '/dev/sdb', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/sdb', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('mdadm', '--create', '/dev/md0', '--force', '--run',
|
||||
@ -3558,22 +3558,22 @@ class TestGenericHardwareManager(base.IronicAgentTest):
|
||||
'gpt'),
|
||||
mock.call('parted', '/dev/nvme0n1', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '551MiB', '10GiB'),
|
||||
mock.call('partx', '-a', '/dev/nvme0n1', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/nvme0n1', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/nvme1n1', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '551MiB', '10GiB'),
|
||||
mock.call('partx', '-a', '/dev/nvme1n1', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/nvme1n1', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/nvme0n1', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '10GiB', '-1'),
|
||||
mock.call('partx', '-a', '/dev/nvme0n1', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/nvme0n1', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('parted', '/dev/nvme1n1', '-s', '-a', 'optimal', '--',
|
||||
'mkpart', 'primary', '10GiB', '-1'),
|
||||
mock.call('partx', '-a', '/dev/nvme1n1', attempts=3,
|
||||
mock.call('partx', '-av', '/dev/nvme1n1', attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('mdadm', '--create', '/dev/md0', '--force', '--run',
|
||||
|
@ -1208,7 +1208,7 @@ class TestGetPartition(base.IronicAgentTest):
|
||||
root_part = partition_utils.get_partition(
|
||||
self.fake_dev, self.fake_root_uuid)
|
||||
self.assertEqual('/dev/test2', root_part)
|
||||
expected = [mock.call('partx', '-a', self.fake_dev, attempts=3,
|
||||
expected = [mock.call('partx', '-av', self.fake_dev, attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('lsblk', '-PbioKNAME,UUID,PARTUUID,TYPE,LABEL',
|
||||
@ -1228,7 +1228,7 @@ class TestGetPartition(base.IronicAgentTest):
|
||||
self.assertRaises(errors.DeviceNotFound,
|
||||
partition_utils.get_partition, self.fake_dev,
|
||||
self.fake_root_uuid)
|
||||
expected = [mock.call('partx', '-a', self.fake_dev, attempts=3,
|
||||
expected = [mock.call('partx', '-av', self.fake_dev, attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('lsblk', '-PbioKNAME,UUID,PARTUUID,TYPE,LABEL',
|
||||
@ -1249,7 +1249,7 @@ class TestGetPartition(base.IronicAgentTest):
|
||||
result = partition_utils.get_partition(
|
||||
self.fake_dev, self.fake_root_uuid)
|
||||
self.assertEqual('/dev/loop0', result)
|
||||
expected = [mock.call('partx', '-a', self.fake_dev, attempts=3,
|
||||
expected = [mock.call('partx', '-av', self.fake_dev, attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('lsblk', '-PbioKNAME,UUID,PARTUUID,TYPE,LABEL',
|
||||
@ -1266,7 +1266,7 @@ class TestGetPartition(base.IronicAgentTest):
|
||||
partition_utils.get_partition, self.fake_dev,
|
||||
self.fake_root_uuid)
|
||||
|
||||
expected = [mock.call('partx', '-a', self.fake_dev, attempts=3,
|
||||
expected = [mock.call('partx', '-av', self.fake_dev, attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('lsblk', '-PbioKNAME,UUID,PARTUUID,TYPE,LABEL',
|
||||
@ -1284,7 +1284,7 @@ class TestGetPartition(base.IronicAgentTest):
|
||||
root_part = partition_utils.get_partition(
|
||||
self.fake_dev, self.fake_root_uuid)
|
||||
self.assertEqual('/dev/test2', root_part)
|
||||
expected = [mock.call('partx', '-a', self.fake_dev, attempts=3,
|
||||
expected = [mock.call('partx', '-av', self.fake_dev, attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('lsblk', '-PbioKNAME,UUID,PARTUUID,TYPE,LABEL',
|
||||
@ -1301,7 +1301,7 @@ class TestGetPartition(base.IronicAgentTest):
|
||||
root_part = partition_utils.get_partition(
|
||||
self.fake_dev, self.fake_root_uuid)
|
||||
self.assertEqual('/dev/test2', root_part)
|
||||
expected = [mock.call('partx', '-a', self.fake_dev, attempts=3,
|
||||
expected = [mock.call('partx', '-av', self.fake_dev, attempts=3,
|
||||
delay_on_retry=True),
|
||||
mock.call('udevadm', 'settle'),
|
||||
mock.call('lsblk', '-PbioKNAME,UUID,PARTUUID,TYPE,LABEL',
|
||||
|
@ -890,7 +890,7 @@ def rescan_device(device):
|
||||
kernel partition records.
|
||||
"""
|
||||
try:
|
||||
execute('partx', '-a', device, attempts=3, delay_on_retry=True)
|
||||
execute('partx', '-av', device, attempts=3, delay_on_retry=True)
|
||||
except processutils.ProcessExecutionError:
|
||||
LOG.warning("Couldn't re-read the partition table "
|
||||
"on device %s", device)
|
||||
|
Loading…
x
Reference in New Issue
Block a user