From 8497435226aa65bb69abdb68a1d6cc94be7966e9 Mon Sep 17 00:00:00 2001 From: Rick Harris Date: Thu, 16 Feb 2012 22:52:54 +0000 Subject: [PATCH] Adds back e2fsck exit code checking. References bug 931743 Change-Id: Id9e71b722e2a3b18821bceffdf138ba3895cfcf1 --- nova/virt/xenapi/vm_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py index 991c685d933..24584d5e41f 100644 --- a/nova/virt/xenapi/vm_utils.py +++ b/nova/virt/xenapi/vm_utils.py @@ -1598,7 +1598,10 @@ def _resize_part_and_fs(dev, start, old_sectors, new_sectors): partition_path = utils.make_dev_path(dev, partition=1) # Replay journal if FS wasn't cleanly unmounted - utils.execute('e2fsck', '-f', '-y', partition_path, run_as_root=True) + # Exit Code 1 = File system errors corrected + # 2 = File system errors corrected, system needs a reboot + utils.execute('e2fsck', '-f', '-y', partition_path, run_as_root=True, + check_exit_code=[0, 1, 2]) # Remove ext3 journal (making it ext2) utils.execute('tune2fs', '-O ^has_journal', partition_path,