From 703cdd82f773e57daef56128ca103eb810be9644 Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Tue, 18 Jun 2013 12:54:40 -0400 Subject: 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 --- nova/cmd/baremetal_deploy_helper.py | 1 + 1 file changed, 1 insertion(+) 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) -- cgit