child.UpgradeConfig()
# FIXME: Make this configurable in Ganeti 2.7
- self.params = {}
+ # Params should be an empty dict that gets filled any time needed
+ # In case of ext template we allow arbitrary params that should not
+ # be overrided during a config reload/upgrade.
+ if not self.params or not isinstance(self.params, dict):
+ self.params = {}
+
# add here config upgrade for this disk
+ # If the file driver is empty, fill it up with the default value
+ if self.dev_type == constants.LD_FILE and self.physical_id[0] is None:
+ self.physical_id[0] = constants.FD_DEFAULT
+
@staticmethod
def ComputeLDParams(disk_template, disk_params):
"""Computes Logical Disk parameters from Disk Template parameters.
"nics",
"disks",
"disk_template",
+ "disks_active",
"network_port",
"serial_no",
] + _TIMESTAMPS + _UUID
if self.osparams is None:
self.osparams = {}
UpgradeBeParams(self.beparams)
+ if self.disks_active is None:
+ self.disks_active = self.admin_state == constants.ADMINST_UP
class OS(ConfigObject):
__slots__ = [
"serial_no",
"rsahostkeypub",
+ "dsahostkeypub",
"highest_used_port",
"tcpudp_port_pool",
"mac_prefix",