Trees | Indices | Help |
|
---|
|
The interface to the cluster configuration.
WARNING: The class is no longer thread-safe! Each thread must construct a separate instance.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
dict of str to int |
|
||
dict of str to int |
|
||
|
|||
List of objects.Disk |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
objects.Disk |
|
||
|
|||
objects.Disk |
|
||
|
|||
|
|||
|
|||
dict |
|
||
set of strings |
|
||
list of strings |
|
||
|
|||
list of strings |
|
||
|
|||
dict or None |
|
||
|
|||
|
|||
|
|||
list of str |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
set |
|
||
string |
|
||
|
|||
list |
|
||
list |
|
||
list |
|
||
list |
|
||
list |
|
||
|
|||
|
|||
|
|||
|
|||
list of ints |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
objects.Node |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
string |
|
||
string |
|
||
|
|||
dict |
|
||
|
|||
object.MasterNetworkParameters |
|
||
string |
|
||
|
|||
string |
|
||
|
|||
string |
|
||
list of string |
|
||
|
|||
|
|||
|
|||
|
|||
string |
|
||
string |
|
||
objects.NodeGroup or None |
|
||
objects.NodeGroup or None |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
list |
|
||
|
|||
|
|||
|
|||
|
|||
objects.Instance |
|
||
objects.Instance |
|
||
objects.Instance |
|
||
|
|||
|
|||
objects.Instance |
|
||
|
|||
objects.Instance |
|
||
objects.Instance |
|
||
|
|||
|
|||
|
|||
|
|||
objects.Instance |
|
||
frozenset |
|
||
frozenset |
|
||
list |
|
||
list |
|
||
dict |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
string |
|
||
list of strings |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
objects.Node |
|
||
objects.Node |
|
||
(list, list) |
|
||
frozenset |
|
||
|
|||
string |
|
||
list |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
list |
|
||
|
|||
dict |
|
||
|
|||
|
|||
|
|||
|
|||
string |
|
||
|
|||
list of strings |
|
||
frozenset |
|
||
list of strings |
|
||
list of strings |
|
||
tuple |
|
||
tuple |
|
||
list |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
dict of strings |
|
||
|
|||
dict |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
objects.Cluster |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
objects.Network |
|
||
|
|||
|
|||
string |
|
||
string |
|
||
|
|||
dict or None |
|
||
|
|||
(string, dict) or (None, None) |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
dict |
|
||
|
|||
string |
|
||
Inherited from |
|
|||
|
|||
|
|||
same as ssconf_values |
|
|
|||
_all_rms a list of all temporary reservation managers |
|
|||
Inherited from |
|
x.__init__(...) initializes x; see help(type(x)) for signature
|
Get the node params populated with cluster defaults.
|
Get the node groups params populated with cluster defaults.
|
Get the ndparams of the group.
|
Get a map of group UUIDs to SSH ports.
|
Get the disk params populated with inherit chain.
|
Return the disks' info for the given instance
|
Return the disks' info for the given instance This is a simple wrapper over _UnlockedGetInstanceDisks.
|
Add a disk to the config.
|
Attach a disk to an instance.
|
Add a disk to the config and attach it to instance. This is a simple wrapper over _UnlockedAddDisk and _UnlockedAttachInstanceDisk.
|
Attach an existing disk to an instance. This is a simple wrapper over _UnlockedAttachInstanceDisk.
|
Detach a disk from an instance.
|
Remove the disk from the configuration.
|
Detach a disk from an instance and remove it from the config. This is a simple wrapper over _UnlockedDetachInstanceDisk and _UnlockedRemoveDisk.
|
Detach a disk from an instance. This is a simple wrapper over _UnlockedDetachInstanceDisk.
|
Returns information about a disk. It takes the information from the configuration file.
|
Returns information about a disk. This is a simple wrapper over _UnlockedGetDiskInfo.
|
Return information about a named disk. Return disk information from the configuration file, searching with the name of the disk.
|
Return information about a named disk. This is a simple wrapper over _UnlockedGetDiskInfoByName.
|
Get the list of disks.
|
Get the configuration of all disks. This is a simple wrapper over _UnlockedGetAllDisksInfo.
|
Get the configuration of all disks.
|
Compute the set of all disk-related nodes for an instance. This abstracts away some work from '_UnlockedGetInstanceNodes' and '_UnlockedGetInstanceSecondaryNodes'.
|
Get all disk-related nodes for an instance. For non-DRBD instances, this will contain only the instance's primary node, whereas for DRBD instances, it will contain both the primary and the secondaries.
|
Get all disk-related nodes for an instance. This is just a wrapper over _UnlockedGetInstanceNodes
|
Get the list of secondary nodes.
|
Get the list of secondary nodes. This is a simple wrapper over _UnlockedGetInstanceSecondaryNodes.
|
Provide a mapping of node to LVs a given instance owns.
|
Provide a mapping of node to LVs a given instance owns. This is a simple wrapper over _UnlockedGetInstanceLVsByNode
|
Get the disk params populated with inherit chain.
|
Get the disk params populated with inherit chain down to node-group.
|
Gets the list of node names of potential master candidates.
|
Generate a MAC for an instance. This should check the current instances for duplicates. |
Reserve a MAC for an instance. This only checks instances managed by this cluster, it does not check for potential collisions elsewhere. |
Commit a reserved IP address to an IP pool. The IP address is taken from the network's IP pool and marked as free. |
Give a specific IP address back to an IP pool. The IP address is returned to the IP pool and marked as reserved. |
Reserve an VG/LV pair for an instance.
|
Generate a DRBD secret. This checks the current disks for duplicates. |
Compute the list of all UUIDs and names we have.
|
Generate an unique UUID. This checks the current node, instances and disk names for duplicates.
|
Generate an unique ID. This is just a wrapper over the unlocked version.
|
Return all MACs present in the config.
|
Return all DRBD secrets present in the config.
|
Per-disk verification checks Extends
|
Verify function.
|
Verify the configuration and log any errors. The errors get logged as critical errors and also to the feedback function, if given.
|
Verify function. This is just a wrapper over _UnlockedVerifyConfig.
|
Adds a new port to the available port pool.
Warning: this method does not "flush" the configuration (via _WriteConfig); callers should do that themselves once the configuration is stable |
Returns a copy of the current port list.
|
Allocate a port. The port will be taken from the available port pool or from the default port range (and in this case we increase highest_used_port).
|
Compute the used DRBD minor/nodes. This is just a wrapper over a call to WConfd.
|
Allocate a drbd minor. This is just a wrapper over a call to WConfd. The free minor will be automatically computed from the existing devices. A node can not be given multiple times. The result is the list of minors, in the same order as the passed nodes.
|
Release temporary drbd minors allocated for a given disk. This is just a wrapper over a call to WConfd.
|
Release temporary drbd minors allocated for a given disk. This should be called on the error paths, on the success paths it's automatically called by the ConfigWriter add and update functions. This function is just a wrapper over _UnlockedReleaseDRBDMinors.
|
Return the disk template of an instance. This corresponds to the currently attached disks. If no disks are attached, it is constants.DT_DISKLESS, if homogeneous disk types are attached, that type is returned, if that isn't the case, constants.DT_MIXED is returned.
|
Get the configuration version.
|
Get cluster name.
|
Get the UUID of the master node for this cluster.
|
Get the hostname of the master node for this cluster.
|
Get the master node information for this cluster.
|
Get the IP of the master node for this cluster.
|
Get the master network device for this cluster.
|
Get the netmask of the master node for this cluster.
|
Get flag representing whether to use the external master IP setup script.
|
Get the file storage dir for this cluster.
|
Get the shared file storage dir for this cluster.
|
Get the Gluster storage dir for this cluster.
|
Get the hypervisor type for this cluster.
|
Return the rsa hostkey from the config.
|
Return the dsa hostkey from the config.
|
Get the default instance allocator for this cluster.
|
Get the default instance allocator parameters for this cluster.
|
Get cluster primary ip family.
|
Get network parameters of the master node.
|
Get the install image location
|
Set the install image location
|
Get cluster instance communication network
|
Set cluster instance communication network
|
Get the zeroing image location
|
Get cluster compression tools
|
Set cluster compression tools
|
Add a node group to the configuration. This method calls group.UpgradeConfig() to fill any missing attributes according to their default values.
|
Remove a node group from the configuration.
|
Lookup a node group's UUID.
|
Lookup a node group's UUID. This function is just a wrapper over _UnlockedLookupNodeGroup.
|
Lookup a node group.
|
Lookup a node group.
|
Get the configuration of all node groups.
|
Get the configuration of all node groups expressed as a dictionary of dictionaries.
|
Get a list of node groups.
|
Get nodes which are member in the same nodegroups as the given nodes.
|
Get the configuration of multiple node groups.
|
Add an instance to the config. This should be used after creating a new instance.
|
Ensures a given object has a valid UUID.
|
Checks that the UUID of the given object is unique.
|
Checks that an object with the given UUID exists.
|
Set the instance's status to a given value.
|
Mark the instance status to up in the config. This also sets the instance disks active flag.
|
Mark the instance status to down in the config. This also clears the instance disks active flag.
|
Remove the instance from the configuration.
|
Rename an instance. This needs to be done in ConfigWriter and not by RemoveInstance combined with AddInstance as only we can guarantee an atomic rename.
|
Mark the status of an instance to down in the configuration. This does not touch the instance disks active flag, as shut down instances can still have active disks.
|
Mark the status of an instance to user down in the configuration. This does not touch the instance disks active flag, as user shut down instances can still have active disks.
|
Mark the status of instance disks active.
|
Mark the status of instance disks inactive.
|
Get the list of instances. This function is for internal use, when the config lock is already held. |
Get the list of instances.
|
Returns information about an instance. This function is for internal use, when the config lock is already held. |
Returns information about an instance. It takes the information from the configuration file. Other information of an instance are taken from the live systems.
|
Returns set of node group UUIDs for instance's nodes.
|
Returns set of network UUIDs for instance's nics.
|
Get the configuration of multiple instances.
|
Get the configuration of multiple instances.
|
Get the configuration of all instances.
|
Get instance configuration with a filter.
|
Get the objects.Instance object for a named instance.
|
Gets the instance name for the passed instance.
|
Gets the instance names for the passed list of nodes.
|
Sets the primary node of an existing instance
|
Sets the nodes of an existing disk
|
Sets the logical_id of an existing disk
|
Add a node to the configuration.
|
Add a node to the configuration.
|
Remove a node from the configuration.
|
Get the configuration of a node, as stored in the config. This function is for internal use, when the config lock is already held.
|
Get the configuration of a node, as stored in the config. This is just a locked wrapper over _UnlockedGetNodeInfo.
|
Get the instances of a node, as stored in the config.
|
Get the instances of a node group.
|
Return the string representation of the list of hyervisor parameters of the given hypervisor. See Also:
|
Return the hypervisor parameters of the given hypervisor.
|
Return the list of nodes which are in the configuration. This function is for internal use, when the config lock is already held.
|
Return the list of nodes which are in the configuration.
|
Return the list of nodes which are online.
|
Return the list of nodes which are not vm capable.
|
Return the list of nodes' uuids which are not vm capable.
|
Return the list of nodes' names which are not vm capable.
|
Get the configuration of multiple nodes.
|
Gets configuration of all nodes. Note: See GetAllNodesInfo |
Get the configuration of all nodes.
|
Get the objects.Node object for a named node.
|
Get the objects.NodeGroup object for a named node group.
|
Gets the node name for the passed node.
|
Gets the node names for the passed list of nodes.
|
Returns groups for a list of nodes.
|
Get the list of UUIDs of master candidates.
|
Get the list of UUIDs of master candidates.
|
Get the number of current and maximum desired and possible candidates.
|
Get the number of current and maximum possible candidates. This is just a wrapper over _UnlockedGetMasterCandidateStats.
|
Try to grow the candidate pool to the desired size.
|
Changes the group of a number of nodes.
|
Returns a ConfigManager, which is suitable to perform a synchronized block of configuration operations. WARNING: This blocks all other configuration operations, so anything that runs inside the block should be very fast, preferably not using any IO. |
Run any upgrade steps. This method performs both in-object upgrades and also update some data elements that need uniqueness across the whole configuration or interact with other objects. Warning: if 'saveafter' is 'True', this function will call _WriteConfig() so it needs to be called only from a "safe" place. |
Get the hvparams of all given hypervisors from the config.
|
Extends the ssconf_values dictionary by hvparams.
|
Return the values needed by ssconf.
|
Wrapper using lock around _UnlockedGetSsconf().
|
Return the volume group name.
|
Set the volume group name.
|
Return DRBD usermode helper.
|
Set DRBD usermode helper.
|
Return the mac prefix.
|
Returns information about the cluster
|
Check if in there is at disk of the given type in the configuration.
|
Returns a detached version of a ConfigManager, which represents a read-only snapshot of the configuration at this particular time.
|
Notify function to be called after updates. This function must be called when an object (as returned by GetInstanceInfo, GetNodeInfo, GetCluster) has been updated and the caller wants the modifications saved to the backing store. Note that all modified objects will be saved, but the target argument is the one the caller wants to ensure that it's saved.
|
Get configuration info of all the networks.
|
Get the list of networks. This function is for internal use, when the config lock is already held. |
Get the list of networks.
|
Get a list of network names
|
Returns information about a network. This function is for internal use, when the config lock is already held. |
Returns information about a network. It takes the information from the configuration file.
|
Add a network to the configuration.
|
Lookup a network's UUID.
|
Lookup a network's UUID. This function is just a wrapper over _UnlockedLookupNetwork.
|
Remove a network from the configuration.
|
Get the netparams (mode, link) of a network. Get a network's netparams for a given node.
|
Locking wrapper of _UnlockedGetGroupNetParams()
|
Check IP uniqueness in nodegroup. Check networks that are connected in the node's node group if ip is contained in any of them. Used when creating/adding a NIC to ensure uniqueness among nodegroups.
|
Returns the candidate certificate map.
|
Replaces the master candidate cert list with the new values.
|
Adds an entry to the candidate certificate map.
|
Removes the entry of the given node in the certificate map.
|
Force the distribution of configuration to master candidates. It is not necessary to hold a lock for this operation, it is handled internally by WConfd. |
Get the configuration of all disks.
|
Returns the instance the disk is currently attached to.
|
|
_all_rmsa list of all temporary reservation managersCurrently the class fulfills 3 main functions:
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Aug 22 11:13:16 2016 | http://epydoc.sourceforge.net |