Trees | Indices | Help |
|
---|
|
Logical units dealing with storage of instances.
|
|||
LUInstanceRecreateDisks Recreate an instance's missing disks. |
|||
LUInstanceGrowDisk Grow a disk of an instance. |
|||
LUInstanceReplaceDisks Replace the disks of an instance. |
|||
LUInstanceActivateDisks Bring up an instance's disks. |
|||
LUInstanceDeactivateDisks Shutdown an instance's disks. |
|||
TLReplaceDisks Replaces disks for an instance. |
|||
TemporaryDisk Creates a new temporary bootable disk, and makes sure it is destroyed. |
|
|||
|
|||
|
|||
bool |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
list of dictionaries |
|
||
string |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
list of objects.Disk |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
_DISK_TEMPLATE_NAME_PREFIX = {constants.DT_PLAIN: "", constant
|
Imports: itertools, logging, os, time, compat, constants, errors, ht, locking, iallocator, objects, utils, rpc, LogicalUnit, NoHooksLU, Tasklet, INSTANCE_DOWN, INSTANCE_NOT_RUNNING, AnnotateDiskParams, CheckIAllocatorOrNode, ExpandNodeUuidAndName, ComputeIPolicyDiskSizesViolation, CheckNodeOnline, CheckInstanceNodeGroups, CheckInstanceState, IsExclusiveStorageEnabledNode, FindFaultyInstanceDisks, GetWantedNodes, CheckDiskTemplateEnabled, GetInstanceInfoText, CopyLockList, ReleaseLocks, CheckNodeVmCapable, BuildInstanceHookEnvByObject, CheckNodeNotDrained, CheckTargetNodeIPolicy, ganeti
|
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.
|
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. |
Whether exclusive_storage is in effect for the given node.
|
Wrapper around _CreateBlockDevInner. This method annotates the root device first. |
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. Since the instance may not have been saved to the config file yet, this function can not query the config file for the instance's disks; in that case they need to be passed as an argument. This function is also used by the disk template conversion mechanism to create the new disks of the instance. Since the instance will have the old template at the time we create the new disks, the new template must be passed as an extra argument.
|
Computes the instance disks.
|
Computes the new instance's disks for the template conversion. This method is used by the disks template conversion mechanism. Using the 'ComputeDisks' method as an auxiliary method computes the disks that will be used for generating the new disk template of the instance. It computes the size, mode, and name parameters from the instance's current disks, such as the volume group and the access parameters for the templates that support them. For conversions targeting an extstorage template, the mandatory provider's name or any user-provided extstorage parameters will also be included in the result.
|
Calculate final instance file storage dir.
|
Check the presence of the spindle options with exclusive_storage.
|
Check that the given disk should or should not have the provider param.
|
Prepares the input and performs a node info call.
|
Checks the vg capacity for a given node.
|
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 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.
|
Converts a disk size in bytes to mebibytes. Warns and rounds up if the size isn't an even multiple of 1 MiB. |
Calculates the ETA based on size written and total size.
|
Wipes instance disks.
|
Dumps an image onto an instance disk.
|
Wrapper for WipeDisks that handles errors.
|
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. Modifies the configuration of the instance, so the caller should re-read the instance configuration, if needed. |
Shutdown block devices of an instance. This function checks if an instance is running, before calling _ShutdownInstanceDisks. |
Prepare the block devices for an instance. This sets up the block devices on all nodes. Modifies the configuration of the instance, so the caller should re-read the instance configuration, if needed.
|
Start the disks of an instance. Modifies the configuration of the instance, so the caller should re-read the instance configuration, if needed. |
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). |
Wrapper around call_blockdev_find to annotate diskparams.
|
Generate a suitable LV name. This will generate a logical volume name for the given instance. |
|
_DISK_TEMPLATE_NAME_PREFIX
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Mon Aug 22 11:13:08 2016 | http://epydoc.sourceforge.net |