From 1e89a135d558706937cb042f9b94e1cfea139dfb Mon Sep 17 00:00:00 2001
From: Michael Hanselmann <hansmi@google.com>
Date: Wed, 30 Nov 2011 14:51:12 +0100
Subject: [PATCH] More fixes after commit 78519c106

A quick QA run successfully finished with these changes.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Andrea Spadaccini <spadaccio@google.com>
---
 lib/backend.py | 4 ++--
 lib/cmdlib.py  | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/lib/backend.py b/lib/backend.py
index 632c93208..31fe2e0d7 100644
--- a/lib/backend.py
+++ b/lib/backend.py
@@ -537,8 +537,8 @@ def _GetVgInfo(name):
 
   return {
     "name": name,
-    "free": vg_free,
-    "size": vg_size,
+    "vg_free": vg_free,
+    "vg_size": vg_size,
     }
 
 
diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index a31b1fee0..6cd361ff6 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -7697,7 +7697,7 @@ class TLMigrateInstance(Tasklet):
     # Check for hypervisor version mismatch and warn the user.
     nodeinfo = self.rpc.call_node_info([source_node, target_node],
                                        None, [self.instance.hypervisor])
-    for ninfo in nodeinfo.items():
+    for ninfo in nodeinfo.values():
       ninfo.Raise("Unable to retrieve node information from node '%s'" %
                   ninfo.node)
     (_, _, (src_info, )) = nodeinfo[source_node].payload
@@ -11424,7 +11424,7 @@ class LUInstanceSetParams(LogicalUnit):
             current_mem = 0
           #TODO(dynmem): do the appropriate check involving MINMEM
           miss_mem = (be_new[constants.BE_MAXMEM] - current_mem -
-                      pninfo.payload["memory_free"])
+                      pnhvinfo["memory_free"])
           if miss_mem > 0:
             raise errors.OpPrereqError("This change will prevent the instance"
                                        " from starting, due to %d MB of memory"
-- 
GitLab