Skip to content

Commit

Permalink
Adds back e2fsck exit code checking.
Browse files Browse the repository at this point in the history
References bug 931743

Change-Id: Id9e71b722e2a3b18821bceffdf138ba3895cfcf1
  • Loading branch information
rconradharris committed Feb 16, 2012
1 parent 34d77ac commit 8497435
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nova/virt/xenapi/vm_utils.py
Expand Up @@ -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,
Expand Down

0 comments on commit 8497435

Please sign in to comment.