From a4433085bf38719bd22a7cfe507c503885c839f2 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 4 Feb 2020 14:39:39 +0000
Subject: [PATCH] openstack: Increase Cinder volume attach timeout to 5 minutes
(RHBZ#1685032).
In some cases we have observed the time taken for a Cinder volume to
attach to the conversion appliance can be longer than the current 60
seconds. Increase the timeout to 5 minutes.
Thanks: Ming Xie.
(cherry picked from commit e2ce290f6e366716f857eeaddc1dc680e5608c80
in virt-v2v)
---
v2v/output_openstack.ml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/v2v/output_openstack.ml b/v2v/output_openstack.ml
index d187f1d5d..bebf9af18 100644
--- a/v2v/output_openstack.ml
+++ b/v2v/output_openstack.ml
@@ -38,7 +38,7 @@ let openstack_binary = "openstack"
let available_timeout = 300 (* seconds *)
(* Timeout waiting for Cinder volumes to attach to the appliance. *)
-let attach_timeout = 60 (* seconds *)
+let attach_timeout = 300 (* seconds *)
(* The -oo options supported by this output method. *)
type os_options = {
@@ -336,7 +336,7 @@ class output_openstack output_conn output_password output_storage
if String.length id > prefix_len then String.sub id 0 prefix_len
else id in
- with_timeout
+ with_timeout ~sleep:5
(sprintf (f_"waiting for cinder volume %s to attach to the conversion appliance") id)
attach_timeout
(fun () ->
--
2.25.4