From e964cc859be4c26f2a55a9ad3943123ae0a181dc Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Wed, 29 Sep 2010 20:32:38 -0400
Subject: [PATCH] Fix instance rename regression from 3fe11ba3

Committ 3fe11ba3 broke the instance rename as we don't use the FQDN
anymore. This fixes it.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 lib/cmdlib.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index 052d4e00b..baded30c0 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -4979,7 +4979,7 @@ class LURenameInstance(LogicalUnit):
     new_name = self.op.new_name
     if self.op.name_check:
       hostinfo = netutils.HostInfo(netutils.HostInfo.NormalizeName(new_name))
-      new_name = hostinfo.name
+      new_name = self.op.new_name = hostinfo.name
       if (self.op.ip_check and
           netutils.TcpPing(hostinfo.ip, constants.DEFAULT_NODED_PORT)):
         raise errors.OpPrereqError("IP %s of instance %s already in use" %
-- 
GitLab