Commit c4f10abb authored by Iustin Pop's avatar Iustin Pop
Browse files

LUInstanceRename: log result of name resolving



While the LU does return the final name, it's useful to log the actual
DNS resolving process (input and output) in order to help with the
diagnose of failures.

The patch also fixes the docstring of the Exec() function.
Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent c694367b
......@@ -5585,6 +5585,8 @@ class LURenameInstance(LogicalUnit):
new_name = self.op.new_name
if self.op.name_check:
hostname = netutils.GetHostname(name=new_name)
self.LogInfo("Resolved given name '%s' to '%s'", new_name,
hostname.name)
new_name = self.op.new_name = hostname.name
if (self.op.ip_check and
netutils.TcpPing(hostname.ip, constants.DEFAULT_NODED_PORT)):
......@@ -5598,7 +5600,7 @@ class LURenameInstance(LogicalUnit):
new_name, errors.ECODE_EXISTS)
def Exec(self, feedback_fn):
"""Reinstall the instance.
"""Rename the instance.
"""
inst = self.instance
......
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