Add udevadm settle after setting flags

This is not going to make things worse.

Change-Id: I9fb6cf5e6b6f64da8f1aaf8611840b6a108acb49
Closes-Bug: #1675734
This commit is contained in:
Vladimir Kozhukalov 2017-03-29 17:34:01 +03:00
parent 75e69a0f99
commit 9b15d47ad5
2 changed files with 3 additions and 1 deletions

View File

@ -239,8 +239,10 @@ class Manager(object):
utils.udevadm_trigger_blocks()
for flag in prt.flags:
pu.set_partition_flag(prt.device, prt.count, flag)
utils.udevadm_trigger_blocks()
if prt.guid:
pu.set_gpt_type(prt.device, prt.count, prt.guid)
utils.udevadm_trigger_blocks()
# If any partition to be created doesn't exist it's an error.
# Probably it's again 'device or resource busy' issue.
if not os.path.exists(prt.name):

View File

@ -1341,7 +1341,7 @@ class TestManagerMultipathPartition(unittest2.TestCase):
for call in mock_utils_wait.mock_calls:
self.assertEqual(call, mock.call(attempts=10))
self.assertEqual(len(mock_utils_trigger.call_args_list), 8)
self.assertEqual(len(mock_utils_trigger.call_args_list), 24)
self.assertEqual(mock_make_label.mock_calls, [
mock.call('/dev/mapper/12312', 'gpt'),