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)
This commit is contained in:
Richard W.M. Jones
2020-02-04 14:39:39 +00:00
committed by Pino Toscano
parent 3dc8b808bd
commit a4433085bf

View File

@@ -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 () ->