Merge "XenAPI: Pass expected return codes to resize2fs"

This commit is contained in:
Zuul
2018-05-15 00:03:17 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 4 deletions

View File

@@ -353,7 +353,7 @@ class ResizeHelpersTestCase(VMUtilsTestBase):
mock_fsck.assert_has_calls([
mock.call(partition_path)])
mock_resize2fs.assert_has_calls([
mock.call(partition_path, None, size='10s')])
mock.call(partition_path, [0], size='10s')])
mock_resize.assert_has_calls([
mock.call(dev_path, 0, 9, True)])
mock_disable_journal.assert_has_calls([
@@ -408,7 +408,7 @@ class ResizeHelpersTestCase(VMUtilsTestBase):
mock_fsck.assert_has_calls([
mock.call(partition_path)])
mock_resize2fs.assert_has_calls([
mock.call(partition_path, None)])
mock.call(partition_path, [0])])
mock_resize.assert_has_calls([
mock.call(dev_path, 0, 29, False)])
mock_disable_journal.assert_has_calls([

View File

@@ -2294,7 +2294,7 @@ def _resize_part_and_fs(dev, start, old_sectors, new_sectors, flags):
if new_sectors < old_sectors:
# Resizing down, resize filesystem before partition resize
try:
nova.privsep.fs.resize2fs(partition_path, None, size='%ds' % size)
nova.privsep.fs.resize2fs(partition_path, [0], size='%ds' % size)
except processutils.ProcessExecutionError as exc:
LOG.error(six.text_type(exc))
reason = _("Shrinking the filesystem down with resize2fs "
@@ -2307,7 +2307,7 @@ def _resize_part_and_fs(dev, start, old_sectors, new_sectors, flags):
if new_sectors > old_sectors:
# Resizing up, resize filesystem after partition resize
nova.privsep.fs.resize2fs(partition_path, None)
nova.privsep.fs.resize2fs(partition_path, [0])
# Add back journal
nova.privsep.fs.ext_journal_enable(partition_path)