diff --git a/lib/bootstrap.py b/lib/bootstrap.py index e6c84d8f959bac5ec41f0c84a86440c7d80f76ce..b302d2c9241fcdc4108871d87588f5e3c4e0062b 100644 --- a/lib/bootstrap.py +++ b/lib/bootstrap.py @@ -221,6 +221,7 @@ def InitCluster(cluster_name, mac_prefix, def_bridge, secondary_ip=secondary_ip, serial_no=1, master_candidate=True, + offline=False, ) sscfg = InitConfig(constants.CONFIG_VERSION, diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 77b087d7a0539dfa021c52ce0e544b8b452a2e9c..c4f8eb4ce7a46083fb1208344cf074c0768c69f6 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -1977,7 +1977,8 @@ class LUAddNode(LogicalUnit): self.new_node = objects.Node(name=node, primary_ip=primary_ip, secondary_ip=secondary_ip, - master_candidate=master_candidate) + master_candidate=master_candidate, + offline=False) def Exec(self, feedback_fn): """Adds the new node to the cluster. @@ -5914,6 +5915,7 @@ class IAllocator(object): "primary_ip": ninfo.primary_ip, "secondary_ip": ninfo.secondary_ip, "total_cpus": remote_info['cpu_total'], + "offline": ninfo.offline, } node_results[nname] = pnr data["nodes"] = node_results diff --git a/lib/objects.py b/lib/objects.py index abfeff12597e02e449e34ac82de0a55a99f1723b..63d5bec9e29041177c92f62882ad791f0e01d762 100644 --- a/lib/objects.py +++ b/lib/objects.py @@ -685,6 +685,7 @@ class Node(TaggableObject): "secondary_ip", "serial_no", "master_candidate", + "offline", ]