Skip to content
Snippets Groups Projects
Commit 8775e62a authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix LUInstanceRecreateDisks with iallocator


Recent iallocator changes (commit fb60bc6a, “iallocator: Add node
whitelist”) broke the parameter validation for LUInstanceRecreateDisks
(the other LUs were manually fixed already):

  $ gnt-instance recreate-disks -I hail --dry-run instance3
  Failure: prerequisites not met for this operation:
  error type: wrong_input, error details:
  Request is missing 'node_whitelist' parameter

By just defining the new parameter, the LU works normally (“INFO:
Selected nodes for instance instance3 via iallocator hail: node2”).

Signed-off-by: default avatarIustin Pop <iustin@google.com>
Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
parent 8775b5b2
No related branches found
No related tags found
No related merge requests found
...@@ -7540,7 +7540,8 @@ class LUInstanceRecreateDisks(LogicalUnit): ...@@ -7540,7 +7540,8 @@ class LUInstanceRecreateDisks(LogicalUnit):
disks=[{constants.IDISK_SIZE: d.size, disks=[{constants.IDISK_SIZE: d.size,
constants.IDISK_MODE: d.mode} constants.IDISK_MODE: d.mode}
for d in self.instance.disks], for d in self.instance.disks],
hypervisor=self.instance.hypervisor) hypervisor=self.instance.hypervisor,
node_whitelist=None)
ial = iallocator.IAllocator(self.cfg, self.rpc, req) ial = iallocator.IAllocator(self.cfg, self.rpc, req)
   
ial.Run(self.op.iallocator) ial.Run(self.op.iallocator)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment