Package ganeti :: Package tools :: Module cfgupgrade :: Class CfgUpgrade
[hide private]
[frames] | no frames]

Class CfgUpgrade

source code


Instance Methods [hide private]
 
__init__(self, opts, args)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
Run(self)
Main program.
source code
 
SetupLogging(self)
Configures the logging module.
source code
 
UpgradeIPolicy(self, ipolicy, default_ipolicy, isgroup) source code
 
UpgradeNetworks(self) source code
 
UpgradeCluster(self) source code
 
UpgradeGroups(self) source code
 
GetExclusiveStorageValue(self)
Return a conservative value of the exclusive_storage flag.
source code
 
RemovePhysicalId(self, disk) source code
 
ChangeDiskDevType(self, disk, dev_type_map)
Replaces disk's dev_type attributes according to the given map.
source code
 
UpgradeDiskDevType(self, disk)
Upgrades the disks' device type.
source code
 
_ConvertDiskAndCheckMissingSpindles(self, iobj, instance) source code
 
UpgradeInstances(self)
Upgrades the instances' configuration.
source code
 
UpgradeRapiUsers(self) source code
 
UpgradeWatcher(self) source code
 
UpgradeFileStoragePaths(self) source code
 
ChangeNodeIndices(self, config_data, old_key_field, new_key_field) source code
 
UpgradeNodeIndices(self) source code
 
UpgradeInstanceIndices(self) source code
 
UpgradeFilters(self) source code
 
UpgradeTopLevelDisks(self)
Upgrades the disks as config top level citizens.
source code
 
UpgradeDiskTemplate(self) source code
 
_ComputeAllNodes(self, disk)
Recursively compute nodes given a top device.
source code
 
_RecursiveUpdateNodes(self, disk, nodes) source code
 
UpgradeDiskNodes(self)
Specify the nodes from which a disk is accessible in its definition.
source code
 
UpgradeAll(self) source code
 
DowngradeCluster(self, cluster) source code
 
DowngradeAll(self) source code
 
_ComposePaths(self) source code
 
_AskUser(self) source code
 
_Downgrade(self, config_major, config_minor, config_version, config_revision) source code
 
_TestLoadingConfigFile(self) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Methods [hide private]
 
AssignUuid(cls, disk) source code
 
DowngradeCollectors(cls, collectors) source code
Static Methods [hide private]
 
CheckHostname(path)
Ensures hostname matches ssconf value.
source code
 
_FillIPolicySpecs(default_ipolicy, ipolicy) source code
 
_ConvertNicNameToUuid(iobj, network2uuid) source code
 
GetNewNodeIndex(nodes_by_old_key, old_key, new_key_field) source code
 
ChangeInstanceIndices(config_data, old_key_field, new_key_field) source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, opts, args)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

CheckHostname(path)
Static Method

source code 

Ensures hostname matches ssconf value.

Parameters:
  • path - Path to ssconf file

UpgradeNetworks(self)

source code 
Decorators:
  • @OrFail("Setting networks")

UpgradeCluster(self)

source code 
Decorators:
  • @OrFail("Upgrading cluster")

UpgradeGroups(self)

source code 
Decorators:
  • @OrFail("Upgrading groups")

GetExclusiveStorageValue(self)

source code 

Return a conservative value of the exclusive_storage flag.

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

ChangeDiskDevType(self, disk, dev_type_map)

source code 

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

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

UpgradeInstances(self)

source code 

Upgrades the instances' configuration.

Decorators:
  • @OrFail("Upgrading instance with spindles")

UpgradeFileStoragePaths(self)

source code 
Decorators:
  • @OrFail("Upgrading file storage paths")

UpgradeNodeIndices(self)

source code 
Decorators:
  • @OrFail("Changing node indices")

UpgradeInstanceIndices(self)

source code 
Decorators:
  • @OrFail("Changing instance indices")

UpgradeFilters(self)

source code 
Decorators:
  • @OrFail("Adding filters")

UpgradeTopLevelDisks(self)

source code 

Upgrades the disks as config top level citizens.

Decorators:
  • @OrFail("Set top level disks")

UpgradeDiskTemplate(self)

source code 
Decorators:
  • @OrFail("Removing disk template")

UpgradeDiskNodes(self)

source code 

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.

Decorators:
  • @OrFail("Upgrading disk nodes")