Commit 99c7b2a1 authored by Iustin Pop's avatar Iustin Pop
Browse files

Fix non-drbd instance creation

Commit 2294 introduced a new instance.all_nodes property, which
unfortunately is working incorrectly for non-drbd instances.

This patch fixes it by making sure the primary node is always added to
the set, even before recursing over (any potential) children.

Reviewed-by: imsnah
parent 7c5abcae
......@@ -548,6 +548,7 @@ class Instance(TaggableObject):
_Helper(nodes, child)
all_nodes = set()
all_nodes.add(self.primary_node)
for device in self.disks:
_Helper(all_nodes, device)
return tuple(all_nodes)
......
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