From 99c7b2a15f0dbce160134c13d1a3c97a8f1042a8 Mon Sep 17 00:00:00 2001 From: Iustin Pop Date: Mon, 19 Jan 2009 14:32:21 +0000 Subject: [PATCH] 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 --- lib/objects.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/objects.py b/lib/objects.py index 26facb6..551ead6 100644 --- a/lib/objects.py +++ b/lib/objects.py @@ -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) -- 1.7.10.4