Commit dae91d02 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Increase timeout for connection on remote import

The source cluster has to shut down an instance before it can be
exported. Doing so can take a while, but the default connection timeout
is only 60 seconds. Adding the shutdown timeout on the receiving cluster
should help.
Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarIustin Pop <>
parent ba5619c2
......@@ -6930,6 +6930,8 @@ class LUCreateInstance(LogicalUnit):
("source_handshake", None, ht.TOr(ht.TList, ht.TNone)),
("source_x509_ca", None, ht.TMaybeString),
("source_instance_name", None, ht.TMaybeString),
("source_shutdown_timeout", constants.DEFAULT_SHUTDOWN_TIMEOUT,
("src_node", None, ht.TMaybeString),
("src_path", None, ht.TMaybeString),
("pnode", None, ht.TMaybeString),
......@@ -7799,7 +7801,11 @@ class LUCreateInstance(LogicalUnit):
elif self.op.mode == constants.INSTANCE_REMOTE_IMPORT:
feedback_fn("* preparing remote import...")
connect_timeout = constants.RIE_CONNECT_TIMEOUT
# The source cluster will stop the instance before attempting to make a
# connection. In some cases stopping an instance can take a long time,
# hence the shutdown timeout is added to the connection timeout.
connect_timeout = (constants.RIE_CONNECT_TIMEOUT +
timeouts = masterd.instance.ImportExportTimeouts(connect_timeout)
assert iobj.primary_node ==
......@@ -481,6 +481,8 @@ class OpCreateInstance(OpCode):
@ivar source_handshake: Signed handshake from source (remote import only)
@ivar source_x509_ca: Source X509 CA in PEM format (remote import only)
@ivar source_instance_name: Previous name of instance (remote import only)
@ivar source_shutdown_timeout: Shutdown timeout used for source instance
(remote import only)
......@@ -498,6 +500,7 @@ class OpCreateInstance(OpCode):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment