class documentation

class CfgUpgrade(object):

View In Hierarchy

Undocumented

Class Method AssignUuid Undocumented
Static Method ChangeInstanceIndices Undocumented
Static Method CheckHostname Ensures hostname matches ssconf value.
Static Method GetNewNodeIndex Undocumented
Method __init__ Undocumented
Method ChangeDiskDevType Replaces disk's dev_type attributes according to the given map.
Method ChangeNodeIndices Undocumented
Method DowngradeAll Undocumented
Method DowngradeXenSettings Re-adds the xen_cmd setting to the configuration.
Method GetExclusiveStorageValue Return a conservative value of the exclusive_storage flag.
Method RemovePhysicalId Undocumented
Method Run Main program.
Method SetupLogging Configures the logging module.
Method UpgradeAll Undocumented
Method UpgradeCluster Undocumented
Method UpgradeDiskDevType Upgrades the disks' device type.
Method UpgradeDiskNodes Specify the nodes from which a disk is accessible in its definition.
Method UpgradeDiskTemplate Undocumented
Method UpgradeFileStoragePaths Undocumented
Method UpgradeFilters Undocumented
Method UpgradeGroups Undocumented
Method UpgradeInstanceIndices Undocumented
Method UpgradeInstances Upgrades the instances' configuration.
Method UpgradeIPolicy Undocumented
Method UpgradeNetworks Undocumented
Method UpgradeNodeIndices Undocumented
Method UpgradeRapiUsers Undocumented
Method UpgradeTopLevelDisks Upgrades the disks as config top level citizens.
Method UpgradeWatcher Undocumented
Instance Variable args Undocumented
Instance Variable config_data Undocumented
Instance Variable errors Undocumented
Instance Variable opts Undocumented
Static Method _ConvertNicNameToUuid Undocumented
Static Method _FillIPolicySpecs Undocumented
Method _AskUser Undocumented
Method _ComposePaths Undocumented
Method _ComputeAllNodes Recursively compute nodes given a top device.
Method _ConvertDiskAndCheckMissingSpindles Undocumented
Method _Downgrade Undocumented
Method _RecursiveUpdateNodes Undocumented
Method _TestLoadingConfigFile Undocumented
@classmethod
def AssignUuid(cls, disk):

Undocumented

@staticmethod
def ChangeInstanceIndices(config_data, old_key_field, new_key_field):

Undocumented

@staticmethod
def CheckHostname(path):

Ensures hostname matches ssconf value.

Parameters
pathPath to ssconf file
@staticmethod
def GetNewNodeIndex(nodes_by_old_key, old_key, new_key_field):

Undocumented

def __init__(self, opts, args):

Undocumented

def ChangeDiskDevType(self, disk, dev_type_map):

Replaces disk's dev_type attributes according to the given map.

This can be used for both, up or downgrading the disks.

def ChangeNodeIndices(self, config_data, old_key_field, new_key_field):

Undocumented

def DowngradeAll(self):

Undocumented

@OrFail('Adding xen_cmd parameter')
def DowngradeXenSettings(self):

Re-adds the xen_cmd setting to the configuration.

def GetExclusiveStorageValue(self):

Return a conservative value of the exclusive_storage flag.

Return True if the cluster or at least a nodegroup have the flag set.

def RemovePhysicalId(self, disk):

Undocumented

def Run(self):

Main program.

def SetupLogging(self):

Configures the logging module.

def UpgradeAll(self):

Undocumented

@OrFail('Upgrading cluster')
def UpgradeCluster(self):

Undocumented

def UpgradeDiskDevType(self, disk):

Upgrades the disks' device type.

@OrFail('Upgrading disk nodes')
def UpgradeDiskNodes(self):

Specify the nodes from which a disk is accessible in its definition.

For every disk that is attached to an instance, get the UUIDs of the nodes that it's accessible from. There are three main cases: 1) Internally mirrored disks (DRBD): These disks are accessible from two nodes, so the nodes list will include these. Their children (data, meta) are also accessible from two nodes, therefore they will inherit the nodes of the parent. 2) Externally mirrored disks (Blockdev, Ext, Gluster, RBD, Shared File): These disks should be accessible from any node in the cluster, therefore the nodes list will be empty. 3) Single-node disks (Plain, File): These disks are accessible from one node only, therefore the nodes list will consist only of the primary instance node.

@OrFail('Removing disk template')
def UpgradeDiskTemplate(self):

Undocumented

@OrFail('Upgrading file storage paths')
def UpgradeFileStoragePaths(self):

Undocumented

@OrFail('Adding filters')
def UpgradeFilters(self):

Undocumented

@OrFail('Upgrading groups')
def UpgradeGroups(self):

Undocumented

@OrFail('Changing instance indices')
def UpgradeInstanceIndices(self):

Undocumented

@OrFail('Upgrading instance with spindles')
def UpgradeInstances(self):

Upgrades the instances' configuration.

def UpgradeIPolicy(self, ipolicy, default_ipolicy, isgroup):

Undocumented

@OrFail('Setting networks')
def UpgradeNetworks(self):

Undocumented

@OrFail('Changing node indices')
def UpgradeNodeIndices(self):

Undocumented

def UpgradeRapiUsers(self):

Undocumented

@OrFail('Set top level disks')
def UpgradeTopLevelDisks(self):

Upgrades the disks as config top level citizens.

def UpgradeWatcher(self):

Undocumented

args =

Undocumented

config_data =

Undocumented

errors: list =

Undocumented

opts =

Undocumented

@staticmethod
def _ConvertNicNameToUuid(iobj, network2uuid):

Undocumented

@staticmethod
def _FillIPolicySpecs(default_ipolicy, ipolicy):

Undocumented

def _AskUser(self):

Undocumented

def _ComposePaths(self):

Undocumented

def _ComputeAllNodes(self, disk):

Recursively compute nodes given a top device.

def _ConvertDiskAndCheckMissingSpindles(self, iobj, instance):

Undocumented

def _Downgrade(self, config_major, config_minor, config_version, config_revision):

Undocumented

def _RecursiveUpdateNodes(self, disk, nodes):

Undocumented

def _TestLoadingConfigFile(self):

Undocumented