Merge "Sync xenapi and libvirt on what flags to pass e2fsck."

This commit is contained in:
Zuul 2018-04-14 02:23:01 +00:00 committed by Gerrit Code Review
commit 3bf1542b7d
2 changed files with 4 additions and 5 deletions

View File

@ -346,7 +346,7 @@ class ResizeHelpersTestCase(VMUtilsTestBase):
vm_utils._resize_part_and_fs('fake', 0, 20, 10, 'boot')
mock_fsck.assert_has_calls([
mock.call(partition_path, flags='-fy')])
mock.call(partition_path)])
mock_resize2fs.assert_has_calls([
mock.call(partition_path, None, size='10s')])
mock_resize.assert_has_calls([
@ -386,8 +386,7 @@ class ResizeHelpersTestCase(VMUtilsTestBase):
self.assertRaises(exception.ResizeError,
vm_utils._resize_part_and_fs,
"fake", 0, 20, 10, "boot")
mock_fsck.assert_has_calls([
mock.call('/dev/fake1', flags='-fy')])
mock_fsck.assert_has_calls([mock.call('/dev/fake1')])
@mock.patch('nova.privsep.fs.ext_journal_disable')
@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, '')
mock_fsck.assert_has_calls([
mock.call(partition_path, flags='-fy')])
mock.call(partition_path)])
mock_resize2fs.assert_has_calls([
mock.call(partition_path, None)])
mock_resize.assert_has_calls([

View File

@ -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)
# 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)
nova.privsep.fs.ext_journal_disable(partition_path)