summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRick Harris <rconradharris@gmail.com>2012-02-16 22:52:54 +0000
committerRick Harris <rconradharris@gmail.com>2012-02-16 22:52:54 +0000
commit8497435226aa65bb69abdb68a1d6cc94be7966e9 (patch)
treebf0f560ecf5e6b15a18a2830b4fb3a99fedd28ee
parent34d77ac8b1919a287865a4bef376579b6bf09b48 (diff)
Adds back e2fsck exit code checking.
References bug 931743 Change-Id: Id9e71b722e2a3b18821bceffdf138ba3895cfcf1
-rw-r--r--nova/virt/xenapi/vm_utils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py
index 991c685d9..24584d5e4 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,