More fixes after commit 78519c106
authorMichael Hanselmann <hansmi@google.com>
Wed, 30 Nov 2011 13:51:12 +0000 (14:51 +0100)
committerMichael Hanselmann <hansmi@google.com>
Thu, 1 Dec 2011 10:38:20 +0000 (11:38 +0100)
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
lib/cmdlib.py

index 632c932..31fe2e0 100644 (file)
@@ -537,8 +537,8 @@ def _GetVgInfo(name):
 
   return {
     "name": name,
-    "free": vg_free,
-    "size": vg_size,
+    "vg_free": vg_free,
+    "vg_size": vg_size,
     }
 
 
index a31b1fe..6cd361f 100644 (file)
@@ -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"