From 4a19bdc01429dbf79c4f0ee4b1ad194bce0d4c41 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ren=C3=A9=20Nussbaumer?= <rn@google.com>
Date: Mon, 13 Dec 2010 15:55:11 +0100
Subject: [PATCH] Set powered to True for added nodes
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: RenΓ© Nussbaumer <rn@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 lib/cmdlib.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/cmdlib.py b/lib/cmdlib.py
index 2dc1900c0..a30ec4974 100644
--- a/lib/cmdlib.py
+++ b/lib/cmdlib.py
@@ -4224,6 +4224,9 @@ class LUAddNode(LogicalUnit):
     new_node = self.new_node
     node = new_node.name
 
+    # We adding a new node so we assume it's powered
+    new_node.powered = True
+
     # for re-adds, reset the offline/drained/master-candidate flags;
     # we need to reset here, otherwise offline would prevent RPC calls
     # later in the procedure; this also means that if the re-add
-- 
GitLab