Make sure that all the nodes where a disk operation is peformed are locked.
Signed-off-by: Bernardo Dal Seno <bdals...@google.com> --- lib/cmdlib.py | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 301f2ab..f7e6684 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -7337,6 +7337,9 @@ class LUInstanceRecreateDisks(LogicalUnit): if self.op.nodes: self.cfg.Update(instance, feedback_fn) + # All touched nodes must be locked + assert all(x in self.owned_locks(locking.LEVEL_NODE) + for x in instance.all_nodes) _CreateDisks(self, instance, to_skip=to_skip) -- 1.7.7.3