diff --git a/nova/tests/unit/virt/xenapi/test_vm_utils.py b/nova/tests/unit/virt/xenapi/test_vm_utils.py index 3bec9f9a3d..5774cddd6c 100644 --- a/nova/tests/unit/virt/xenapi/test_vm_utils.py +++ b/nova/tests/unit/virt/xenapi/test_vm_utils.py @@ -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([ diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py index 4110e9135c..9bad2cdc70 100644 --- a/nova/virt/xenapi/vm_utils.py +++ b/nova/virt/xenapi/vm_utils.py @@ -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)