diff options
| author | Rick Harris <rconradharris@gmail.com> | 2012-02-08 03:18:03 +0000 |
|---|---|---|
| committer | Rick Harris <rconradharris@gmail.com> | 2012-02-08 20:28:43 +0000 |
| commit | 513796626d6564e1a30ed664fca7bd6ce9ff762a (patch) | |
| tree | f1bac780ccc8233c34d2cbe52648c75ee62bd4e5 | |
| parent | 06e82edc801559c7983744c5ee560422810b43d1 (diff) | |
Allow e2fsck to exit with 1
Fixes bug 928603
Change-Id: I431979bceb7ff5835167aceb10dfb0652b8fe310
| -rw-r--r-- | nova/virt/xenapi/vm_utils.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/nova/virt/xenapi/vm_utils.py b/nova/virt/xenapi/vm_utils.py index 638042e35..91cbe2e38 100644 --- a/nova/virt/xenapi/vm_utils.py +++ b/nova/virt/xenapi/vm_utils.py @@ -1446,9 +1446,14 @@ def _resize_part_and_fs(dev, start, old_sectors, new_sectors): run_as_root=True) # fsck the disk + # # NOTE(sirp): using -p here to automatically repair filesystem, is # this okay? - utils.execute('e2fsck', '-f', '-p', 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', '-p', partition_path, run_as_root=True, + check_exit_code=[0, 1, 2]) if new_sectors < old_sectors: # Resizing down, resize filesystem before partition resize |
