Merge "Sync xenapi and libvirt on what flags to pass e2fsck."
This commit is contained in:
@@ -346,7 +346,7 @@ class ResizeHelpersTestCase(VMUtilsTestBase):
|
|||||||
vm_utils._resize_part_and_fs('fake', 0, 20, 10, 'boot')
|
vm_utils._resize_part_and_fs('fake', 0, 20, 10, 'boot')
|
||||||
|
|
||||||
mock_fsck.assert_has_calls([
|
mock_fsck.assert_has_calls([
|
||||||
mock.call(partition_path, flags='-fy')])
|
mock.call(partition_path)])
|
||||||
mock_resize2fs.assert_has_calls([
|
mock_resize2fs.assert_has_calls([
|
||||||
mock.call(partition_path, None, size='10s')])
|
mock.call(partition_path, None, size='10s')])
|
||||||
mock_resize.assert_has_calls([
|
mock_resize.assert_has_calls([
|
||||||
@@ -386,8 +386,7 @@ class ResizeHelpersTestCase(VMUtilsTestBase):
|
|||||||
self.assertRaises(exception.ResizeError,
|
self.assertRaises(exception.ResizeError,
|
||||||
vm_utils._resize_part_and_fs,
|
vm_utils._resize_part_and_fs,
|
||||||
"fake", 0, 20, 10, "boot")
|
"fake", 0, 20, 10, "boot")
|
||||||
mock_fsck.assert_has_calls([
|
mock_fsck.assert_has_calls([mock.call('/dev/fake1')])
|
||||||
mock.call('/dev/fake1', flags='-fy')])
|
|
||||||
|
|
||||||
@mock.patch('nova.privsep.fs.ext_journal_disable')
|
@mock.patch('nova.privsep.fs.ext_journal_disable')
|
||||||
@mock.patch('nova.privsep.fs.ext_journal_enable')
|
@mock.patch('nova.privsep.fs.ext_journal_enable')
|
||||||
@@ -402,7 +401,7 @@ class ResizeHelpersTestCase(VMUtilsTestBase):
|
|||||||
vm_utils._resize_part_and_fs('fake', 0, 20, 30, '')
|
vm_utils._resize_part_and_fs('fake', 0, 20, 30, '')
|
||||||
|
|
||||||
mock_fsck.assert_has_calls([
|
mock_fsck.assert_has_calls([
|
||||||
mock.call(partition_path, flags='-fy')])
|
mock.call(partition_path)])
|
||||||
mock_resize2fs.assert_has_calls([
|
mock_resize2fs.assert_has_calls([
|
||||||
mock.call(partition_path, None)])
|
mock.call(partition_path, None)])
|
||||||
mock_resize.assert_has_calls([
|
mock_resize.assert_has_calls([
|
||||||
|
@@ -2296,7 +2296,7 @@ def _resize_part_and_fs(dev, start, old_sectors, new_sectors, flags):
|
|||||||
partition_path = utils.make_dev_path(dev, partition=1)
|
partition_path = utils.make_dev_path(dev, partition=1)
|
||||||
|
|
||||||
# Replay journal if FS wasn't cleanly unmounted
|
# Replay journal if FS wasn't cleanly unmounted
|
||||||
nova.privsep.fs.e2fsck(partition_path, flags='-fy')
|
nova.privsep.fs.e2fsck(partition_path)
|
||||||
|
|
||||||
# Remove ext3 journal (making it ext2)
|
# Remove ext3 journal (making it ext2)
|
||||||
nova.privsep.fs.ext_journal_disable(partition_path)
|
nova.privsep.fs.ext_journal_disable(partition_path)
|
||||||
|
Reference in New Issue
Block a user