OpGroupVerifyDisks: Fix wrong result type declaration
authorMichael Hanselmann <hansmi@google.com>
Wed, 19 Oct 2011 05:43:47 +0000 (07:43 +0200)
committerMichael Hanselmann <hansmi@google.com>
Wed, 19 Oct 2011 09:47:01 +0000 (11:47 +0200)
If an instance had actually a missing disk, the type check would fail.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

lib/cmdlib.py
lib/opcodes.py

index 66903ab..c5d0415 100644 (file)
@@ -3167,7 +3167,7 @@ class LUGroupVerifyDisks(NoHooksLU):
       # any leftover items in nv_dict are missing LVs, let's arrange the data
       # better
       for key, inst in nv_dict.iteritems():
-        res_missing.setdefault(inst, []).append(key)
+        res_missing.setdefault(inst, []).append(list(key))
 
     return (res_nodes, list(res_instances), res_missing)
 
index 020301a..bd8964d 100644 (file)
@@ -673,7 +673,8 @@ class OpGroupVerifyDisks(OpCode):
     ht.TAnd(ht.TIsLength(3),
             ht.TItems([ht.TDictOf(ht.TString, ht.TString),
                        ht.TListOf(ht.TString),
-                       ht.TDictOf(ht.TString, ht.TListOf(ht.TString))]))
+                       ht.TDictOf(ht.TString,
+                                  ht.TListOf(ht.TListOf(ht.TString)))]))
 
 
 class OpClusterRepairDiskSizes(OpCode):