Trees | Indices | Help |
|
---|
|
Module implementing the master-side code.
|
|||
ResultWithJobs Data container for LU results with jobs. |
|||
LogicalUnit Logical Unit base class. |
|||
NoHooksLU Simple LU which runs no hooks. |
|||
Tasklet Tasklet base class. |
|||
_QueryBase Base for query utility classes. |
|||
LUClusterPostInit Logical unit for running hooks after cluster initialization. |
|||
LUClusterDestroy Logical unit for destroying the cluster. |
|||
_VerifyErrors Mix-in for cluster/group verify LUs. |
|||
LUClusterVerify Submits all jobs necessary to verify the cluster. |
|||
LUClusterVerifyConfig Verifies the cluster config. |
|||
LUClusterVerifyGroup Verifies the status of a node group. |
|||
LUClusterVerifyDisks Verifies the cluster disks status. |
|||
LUGroupVerifyDisks Verifies the status of all disks in a node group. |
|||
LUClusterRepairDiskSizes Verifies the cluster disks sizes. |
|||
LUClusterRename Rename the cluster. |
|||
LUClusterSetParams Change the parameters of the cluster. |
|||
LUClusterRedistConf Force the redistribution of cluster configuration. |
|||
LUClusterActivateMasterIp Activate the master IP on the master node. |
|||
LUClusterDeactivateMasterIp Deactivate the master IP on the master node. |
|||
LUOobCommand Logical unit for OOB handling. |
|||
_OsQuery | |||
LUOsDiagnose Logical unit for OS diagnose/query. |
|||
_ExtStorageQuery | |||
LUExtStorageDiagnose Logical unit for ExtStorage diagnose/query. |
|||
LUNodeRemove Logical unit for removing a node. |
|||
_NodeQuery | |||
LUNodeQuery Logical unit for querying nodes. |
|||
LUNodeQueryvols Logical unit for getting volumes on node(s). |
|||
LUNodeQueryStorage Logical unit for getting information on storage units on node(s). |
|||
_InstanceQuery | |||
LUQuery Query for resources/items of a certain kind. |
|||
LUQueryFields Query for resources/items of a certain kind. |
|||
LUNodeModifyStorage Logical unit for modifying a storage volume on a node. |
|||
LUNodeAdd Logical unit for adding node to the cluster. |
|||
LUNodeSetParams Modifies the parameters of a node. |
|||
LUNodePowercycle Powercycles a node. |
|||
LUClusterQuery Query cluster configuration. |
|||
LUClusterConfigQuery Return configuration values. |
|||
_ClusterQuery | |||
LUInstanceActivateDisks Bring up an instance's disks. |
|||
LUInstanceDeactivateDisks Shutdown an instance's disks. |
|||
LUInstanceStartup Starts an instance. |
|||
LUInstanceReboot Reboot an instance. |
|||
LUInstanceShutdown Shutdown an instance. |
|||
LUInstanceReinstall Reinstall an instance. |
|||
LUInstanceRecreateDisks Recreate an instance's missing disks. |
|||
LUInstanceRename Rename an instance. |
|||
LUInstanceRemove Remove an instance. |
|||
LUInstanceQuery Logical unit for querying instances. |
|||
LUInstanceFailover Failover an instance. |
|||
LUInstanceMigrate Migrate an instance. |
|||
LUInstanceMove Move an instance by data-copying. |
|||
LUNodeMigrate Migrate all instances from a node. |
|||
TLMigrateInstance Tasklet class for instance migration. |
|||
LUInstanceCreate Create an instance. |
|||
LUInstanceMultiAlloc Allocates multiple instances at the same time. |
|||
LUInstanceConsole Connect to an instance's console. |
|||
LUInstanceReplaceDisks Replace the disks of an instance. |
|||
TLReplaceDisks Replaces disks for an instance. |
|||
LURepairNodeStorage Repairs the volume group on a node. |
|||
LUNodeEvacuate Evacuates instances off a list of nodes. |
|||
LUInstanceGrowDisk Grow a disk of an instance. |
|||
LUInstanceQueryData Query runtime instance data. |
|||
_InstNicModPrivate Data structure for network interface modifications. |
|||
LUInstanceSetParams Modifies an instances's parameters. |
|||
LUInstanceChangeGroup | |||
LUBackupQuery Query the exports list |
|||
_ExportQuery | |||
LUBackupPrepare Prepares an instance for an export and returns useful information. |
|||
LUBackupExport Export an instance to an image in the cluster. |
|||
LUBackupRemove Remove exports related to the named instance. |
|||
LUGroupAdd Logical unit for creating node groups. |
|||
LUGroupAssignNodes Logical unit for assigning nodes to groups. |
|||
_GroupQuery | |||
LUGroupQuery Logical unit for querying node groups. |
|||
LUGroupSetParams Modifies the parameters of a node group. |
|||
LUGroupRemove | |||
LUGroupRename | |||
LUGroupEvacuate | |||
TagsLU Generic tags LU. |
|||
LUTagsGet Returns the tags of a given object. |
|||
LUTagsSearch Searches the tags for a given pattern. |
|||
LUTagsSet Sets a tag on a given object. |
|||
LUTagsDel Delete a list of tags from a given object. |
|||
LUTestDelay Sleep for a specified amount of time. |
|||
LURestrictedCommand Logical unit for executing restricted commands. |
|||
LUTestJqueue Utility LU to test some aspects of the job queue. |
|||
LUTestAllocator Run allocator tests. |
|||
LUNetworkAdd Logical unit for creating networks. |
|||
LUNetworkRemove | |||
LUNetworkSetParams Modifies the parameters of a network. |
|||
_NetworkQuery | |||
LUNetworkQuery Logical unit for querying networks. |
|||
LUNetworkConnect Connect a network to a nodegroup |
|||
LUNetworkDisconnect Disconnect a network to a nodegroup |
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
bool |
|
||
bool |
|
||
|
|||
list |
|
||
list |
|
||
dict |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
dict; tuple of (node name, volume name) as key, instance name as value |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
dict |
|
||
|
|||
|
|||
dict |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
string |
|
||
|
|||
|
|||
list of (origin, hypervisor, parameters) |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
list of objects.Disk |
|
||
|
|||
integer |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
boolean |
|
||
|
|||
list |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
dict |
|
||
|
|||
|
|||
|
|||
|
|||
list |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
INSTANCE_DOWN = [constants.ADMINST_DOWN]
|
|||
INSTANCE_ONLINE = [constants.ADMINST_DOWN, constants.ADMINST_UP]
|
|||
INSTANCE_NOT_RUNNING = [constants.ADMINST_DOWN, constants.ADMI
|
|||
CAN_CHANGE_INSTANCE_OFFLINE = frozenset(INSTANCE_DOWN) | froze Instance status in which an instance can be marked as offline/online |
|||
_DISK_TEMPLATE_NAME_PREFIX = {constants.DT_PLAIN: "", constant
|
|||
_DISK_TEMPLATE_DEVICE_TYPE = {constants.DT_PLAIN: constants.LD
|
|||
_TApplyContModsCbChanges = ht.TMaybeListOf(ht.TAnd(ht.TIsLengt Type description for changes as returned by ApplyContainerMods's callbacks |
|||
_QUERY_IMPL = {constants.QR_CLUSTER: _ClusterQuery, constants. Query type implementations |
Imports: os, time, re, logging, copy, OpenSSL, socket, tempfile, shutil, itertools, operator, ssh, utils, errors, hypervisor, locking, constants, objects, ssconf, uidpool, compat, masterd, netutils, query, qlang, opcodes, ht, rpc, runtime, pathutils, vcluster, network, iallocator, ganeti
|
Little helper wrapper to the rpc annotation method.
|
Checks if node groups for locked instances are still correct.
|
Checks if the owned node groups are still correct for an instance.
|
Checks if the instances in a node group are still correct.
|
Tells if node supports OOB.
|
Whether exclusive_storage is in effect for the given node.
|
Whether exclusive_storage is in effect for the given node.
|
Makes a copy of a list of lock names. Handles locking.ALL_SET correctly. |
Returns list of checked and expanded node names.
|
Returns list of checked and expanded instance names.
|
Return the new version of a parameter dictionary.
|
Return the new version of a instance policy.
|
Updates and verifies a dict with sub dicts of the same type.
|
Combines the hv state from an opcode with the one of the object
|
Combines the disk state from an opcode with the one of the object
|
Releases locks owned by an LU.
|
Creates a map from (node, volume) to instance name.
|
Checks whether all selected fields are valid.
|
Make sure that none of the given paramters is global. If a global parameter is found, an errors.OpPrereqError exception is raised. This is used to avoid setting global parameters for individual nodes.
|
Ensure that a given node is online.
|
Ensure that a given node is not drained.
|
Ensure that a given node is vm capable.
|
Ensure that a node supports a given OS.
|
Ensure that a node has the given secondary ip.
|
Ensure that an instance is in one of the required states.
|
Computes if value is in the desired range.
|
Verifies ipolicy against provided specs.
|
Compute if instance meets the specs of ipolicy.
See Also: _ComputeIPolicySpecViolation |
Compute if instance specs meets the specs of ipolicy.
See Also: _ComputeIPolicySpecViolation |
Compute if instance meets the specs of the new target group.
See Also: _ComputeIPolicySpecViolation |
Checks that the target node is correct in terms of instance policy.
See Also: _ComputeIPolicySpecViolation |
Computes a set of any instances that would violate the new ipolicy.
|
Expand an item name.
|
Builds network related env variables for hooks This builds the hook environment from individual variables.
|
Builds instance related env variables for hooks This builds the hook environment from individual variables.
|
Build a tupple of nic information.
|
Build a list of nic information tuples. This list is suitable to be passed to _BuildInstanceHookEnv or as a return value in LUInstanceQueryData.
|
Builds instance related env variables for hooks from an object.
|
Computes a set of instances who violates given ipolicy.
|
Check whether an OS name conforms to the os variants specification.
|
Check the sanity of iallocator and node arguments and use the cluster-wide iallocator if appropriate. Check that at most one of (iallocator, node) is specified. If none is specified, or the iallocator is constants.DEFAULT_IALLOCATOR_SHORTCUT, then the LU's opcode's iallocator slot is filled with the cluster-wide default iallocator.
|
Decides on which iallocator to use.
|
Ensures that a given hostname resolves to a 'sane' name. The given name is required to be a prefix of the resolved hostname, to prevent accidental mismatches.
|
Verifies a certificate for LUClusterVerifyConfig.
|
Compute the set of all hypervisor parameters.
|
Checks if a netmask is valid.
|
Compute files external to Ganeti which need to be consistent.
|
Distribute additional files which are part of the cluster configuration. ConfigWriter takes care of distributing the config and ssconf files, but there are more files which should be distributed to all nodes. This function makes sure those are copied.
|
Wrapper around call_blockdev_find to annotate diskparams.
|
Check that mirrors are not degraded. Attention: The device has to be annotated already. The ldisk parameter, if True, will change the test from the is_degraded attribute (which represents overall non-ok status for the device(s)) to the ldisk (representing the local storage status). |
Prepare the block devices for an instance. This sets up the block devices on all nodes.
|
Shutdown block devices of an instance. This function checks if an instance is running, before calling _ShutdownInstanceDisks. |
Return the instance disks selected by the disks list
|
Shutdown block devices of an instance. This does the shutdown on all nodes of the instance. If the ignore_primary is false, errors on the primary node are ignored. |
Checks if a node has enough free memory. This function checks if a given node has the needed amount of free memory. In case the node has less memory or we cannot get the information from the node, this function raises an OpPrereqError exception.
|
Checks if nodes have enough free disk space in all the VGs. This function checks if all given nodes have the needed amount of free disk. In case any node has less disk or we cannot get the information from the node, this function raises an OpPrereqError exception.
|
Checks if nodes have enough free disk space in the specified VG. This function checks if all given nodes have the needed amount of free disk. In case any node has less disk or we cannot get the information from the node, this function raises an OpPrereqError exception.
|
Checks if nodes have enough physical CPUs This function checks if all given nodes have the needed number of physical CPUs. In case any node has less CPUs or we cannot get the information from the node, this function raises an OpPrereqError exception.
|
Expands names for use with TLMigrateInstance.
|
Declares locks for TLMigrateInstance.
|
Wrapper around _CreateBlockDevInner. This method annotates the root device first. |
Create a tree of block devices on a given node. If this device type has to be created on secondaries, create it and all its children. If not, just recurse to children keeping the same 'force' value.
Attention: The device has to be annotated already. |
Create a single block device on a given node. This will not recurse over children of the device, so they must be created in advance.
|
Generate a suitable LV name. This will generate a logical volume name for the given instance. |
Calculates the ETA based on size written and total size.
|
Wipes instance disks.
|
Wrapper for _WipeDisks that handles errors.
|
Undo the work performed by _CreateDisks. This function is called in case of an error to undo the work of _CreateDisks.
|
Create all disks for an instance. This abstracts away some work from AddInstance.
|
Remove all disks for an instance. This abstracts away some work from `AddInstance()` and `RemoveInstance()`. Note that in case some of the devices couldn't be removed, the removal will continue with the other ones.
|
Filters out non-vm_capable nodes from a list.
|
Hypervisor parameter validation. This function abstract the hypervisor parameter validation to be used in both instance create and instance modify.
|
OS parameters validation.
|
Wrapper around IAReqInstanceAlloc.
|
Computes the nics.
|
Computes the instance disks.
|
Computes the full beparams.
|
Returns console information for an instance.
|
Unpacks the result of change-group and node-evacuate iallocator requests. Iallocator modes constants.IALLOCATOR_MODE_NODE_EVAC and constants.IALLOCATOR_MODE_CHG_GROUP.
|
Converts a disk size in bytes to mebibytes. Warns and rounds up if the size isn't an even multiple of 1 MiB. |
Prepares a list of container modifications by adding a private data field.
|
Applies descriptions in
|
Updates the
|
Checks for network interface conflicts with a network.
|
Returns the implemtnation for a query type.
|
In case of conflicting IP address raise error.
|
|
INSTANCE_NOT_RUNNING
|
CAN_CHANGE_INSTANCE_OFFLINEInstance status in which an instance can be marked as offline/online
|
_DISK_TEMPLATE_NAME_PREFIX
|
_DISK_TEMPLATE_DEVICE_TYPE
|
_TApplyContModsCbChangesType description for changes as returned by ApplyContainerMods's callbacks
|
_QUERY_IMPLQuery type implementations
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Dec 3 11:32:30 2013 | http://epydoc.sourceforge.net |