From c4f10abb471a4c993dd64d527899320f6812d29f Mon Sep 17 00:00:00 2001 From: Iustin Pop <iustin@google.com> Date: Fri, 24 Dec 2010 09:27:15 +0100 Subject: [PATCH] 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: Iustin Pop <iustin@google.com> Reviewed-by: Guido Trotter <ultrotter@google.com> --- lib/cmdlib.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index e326842f3..5f87224b4 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -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 -- GitLab