diff options
| author | Dan Prince <dprince@redhat.com> | 2013-06-18 12:54:40 -0400 |
|---|---|---|
| committer | Dan Prince <dprince@redhat.com> | 2013-06-18 13:57:30 -0400 |
| commit | 703cdd82f773e57daef56128ca103eb810be9644 (patch) | |
| tree | 717f7a60d1d6f14205e344ae4fa19125e9e349f2 | |
| parent | 086ec7a5b857fa1b88877c10991801761d819c98 (diff) | |
| download | nova-703cdd82f773e57daef56128ca103eb810be9644.tar.gz nova-703cdd82f773e57daef56128ca103eb810be9644.tar.xz nova-703cdd82f773e57daef56128ca103eb810be9644.zip | |
Retry the sfdisk command up to 3 times.
Updates the nova baremetal-deploy-helper so that we retry
the fdisk command up to 3 times.
Previously the command would sometimes intermittently fail with
'Device or resource busy' errors. There doesn't seem to be a good way
to check/verify this other than to retry.
Fixes LP Bug #1191084.
Change-Id: I9c0733432dee5d556d6d2460db42f844e277c8de
| -rw-r--r-- | nova/cmd/baremetal_deploy_helper.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/nova/cmd/baremetal_deploy_helper.py b/nova/cmd/baremetal_deploy_helper.py index 8586e6e59..c28c0eef1 100644 --- a/nova/cmd/baremetal_deploy_helper.py +++ b/nova/cmd/baremetal_deploy_helper.py @@ -91,6 +91,7 @@ def make_partitions(dev, root_mb, swap_mb): stdin_command = ('1,%d,83;\n,%d,82;\n0,0;\n0,0;\n' % (root_mb, swap_mb)) utils.execute('sfdisk', '-uM', dev, process_input=stdin_command, run_as_root=True, + attempts=3, check_exit_code=[0]) # avoid "device is busy" time.sleep(3) |
