Commit ec944cc0 authored by Bernardo Dal Seno's avatar Bernardo Dal Seno
Browse files

InstanceRecreateDisks: new assertion for node locks

Make sure that all the nodes where a disk operation is peformed are locked.
Signed-off-by: default avatarBernardo Dal Seno <>
Reviewed-by: default avatarMichael Hanselmann <>
parent cf8adf26
......@@ -7337,6 +7337,9 @@ class LUInstanceRecreateDisks(LogicalUnit):
if self.op.nodes:
self.cfg.Update(instance, feedback_fn)
# All touched nodes must be locked
mylocks = self.owned_locks(locking.LEVEL_NODE)
assert mylocks.issuperset(frozenset(instance.all_nodes))
_CreateDisks(self, instance, to_skip=to_skip)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment