Add debugging clause to _ExpandCheckDisks error
authorGuido Trotter <ultrotter@google.com>
Wed, 22 May 2013 12:52:32 +0000 (14:52 +0200)
committerGuido Trotter <ultrotter@google.com>
Wed, 22 May 2013 14:53:20 +0000 (16:53 +0200)
This has been reported by users, so we should have the extra debugging
available.

Signed-off-by: Guido Trotter <ultrotter@google.com>
Reviewed-by: Michele Tartara <mtartara@google.com>

lib/cmdlib.py

index 0adf0f1..5c4628e 100644 (file)
@@ -7056,7 +7056,8 @@ def _ExpandCheckDisks(instance, disks):
   else:
     if not set(disks).issubset(instance.disks):
       raise errors.ProgrammerError("Can only act on disks belonging to the"
-                                   " target instance")
+                                   " target instance: expected a subset of %r,"
+                                   " got %r" % (instance.disks, disks))
     return disks