From 4ca954fbfd5dad912e24623ab6980b97c944368a Mon Sep 17 00:00:00 2001 From: Dan Prince Date: Thu, 20 Jun 2013 09:47:16 -0400 Subject: [PATCH] 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: I18be73cba9c5bf5a4f9cf229dedc4494666c9b35 --- ironic/cmd/ironic_deploy_helper.py | 1 + 1 file changed, 1 insertion(+) diff --git a/ironic/cmd/ironic_deploy_helper.py b/ironic/cmd/ironic_deploy_helper.py index 50778a9e59..ffb6cbd673 100644 --- a/ironic/cmd/ironic_deploy_helper.py +++ b/ironic/cmd/ironic_deploy_helper.py @@ -90,6 +90,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)