diff options
author | Scott Moser <smoser@brickies.net> | 2017-05-25 13:06:08 -0400 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2017-05-26 13:37:41 -0400 |
commit | 1815c6d801933c47a01f1a94a8e689824f6797b4 (patch) | |
tree | 8df52d0f27cc498b1a49e55a5ce87bc84386d0ef /tests | |
parent | d27c49391df343d25bd2e24045d2be6bf39c30d2 (diff) | |
download | vyos-cloud-init-1815c6d801933c47a01f1a94a8e689824f6797b4.tar.gz vyos-cloud-init-1815c6d801933c47a01f1a94a8e689824f6797b4.zip |
disk_setup: udev settle before attempting partitioning or fs creation.
This attempts to use udevadm settle to wait until devices have been
fully "realized". If a device exists, there may still be events in
the udev queue that would create its partition table entries.
We need to wait until those have been processed also.
LP: #1692093
Diffstat (limited to 'tests')
-rw-r--r-- | tests/unittests/test_handler/test_handler_disk_setup.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/unittests/test_handler/test_handler_disk_setup.py b/tests/unittests/test_handler/test_handler_disk_setup.py index e3226978..916a0d7a 100644 --- a/tests/unittests/test_handler/test_handler_disk_setup.py +++ b/tests/unittests/test_handler/test_handler_disk_setup.py @@ -168,6 +168,8 @@ class TestUpdateFsSetupDevices(TestCase): }, fs_setup) +@mock.patch('cloudinit.config.cc_disk_setup.assert_and_settle_device', + return_value=None) @mock.patch('cloudinit.config.cc_disk_setup.find_device_node', return_value=('/dev/xdb1', False)) @mock.patch('cloudinit.config.cc_disk_setup.device_type', return_value=None) |