Commit 3d914585 authored by René Nussbaumer's avatar René Nussbaumer

Add prealloc_wipe_disks as a cluster-wide configuration variable

This is the first step for the support of wiping block devices prior
to creation of the instance.
Signed-off-by: default avatarRené Nussbaumer <rn@google.com>
Reviewed-by: default avatarIustin Pop <iustin@google.com>
parent 69750d44
......@@ -227,7 +227,7 @@ def InitCluster(cluster_name, mac_prefix,
modify_etc_hosts=True, modify_ssh_setup=True,
maintain_node_health=False, drbd_helper=None,
uid_pool=None, default_iallocator=None,
primary_ip_version=None):
primary_ip_version=None, prealloc_wipe_disks=False):
"""Initialise the cluster.
@type candidate_pool_size: int
......@@ -394,6 +394,7 @@ def InitCluster(cluster_name, mac_prefix,
drbd_usermode_helper=drbd_helper,
default_iallocator=default_iallocator,
primary_ip_family=ipcls.family,
prealloc_wipe_disks=prealloc_wipe_disks,
)
master_node_config = objects.Node(name=hostname.name,
primary_ip=hostname.ip,
......
......@@ -1006,6 +1006,7 @@ class Cluster(TaggableObject):
"hidden_os",
"blacklisted_os",
"primary_ip_family",
"prealloc_wipe_disks",
] + _TIMESTAMPS + _UUID
def UpgradeConfig(self):
......@@ -1082,6 +1083,9 @@ class Cluster(TaggableObject):
if self.primary_ip_family is None:
self.primary_ip_family = AF_INET
if self.prealloc_wipe_disks is None:
self.prealloc_wipe_disks = False
def ToDict(self):
"""Custom function for cluster.
......
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