Commit 3f2ad566 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Allow remote imports without checked names



By default all names are checked (LUCreateInstance, name_check). In some
cases it can be useful to disable this check, but doing so was not
allowed for remote imports. One should be aware, however, that using
this feature can lead to rename script failures when importing a remote
instance without the proper name, e.g.:

“Failed to run rename script for inst1 on node node3.example.com: OS
rename script failed (exited with exit code 1), last lines in the log
file:\nCannot rename from inst2.example.com to inst1:\nInstance has a
different hostname (inst2)”
Signed-off-by: default avatarMichael Hanselmann <hansmi@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 3d889a7d
...@@ -6657,9 +6657,6 @@ class LUCreateInstance(LogicalUnit): ...@@ -6657,9 +6657,6 @@ class LUCreateInstance(LogicalUnit):
self.op.instance_name = self.hostname1.name self.op.instance_name = self.hostname1.name
# used in CheckPrereq for ip ping check # used in CheckPrereq for ip ping check
self.check_ip = self.hostname1.ip self.check_ip = self.hostname1.ip
elif self.op.mode == constants.INSTANCE_REMOTE_IMPORT:
raise errors.OpPrereqError("Remote imports require names to be checked",
errors.ECODE_INVAL)
else: else:
self.check_ip = None self.check_ip = None
......
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