Trees | Indices | Help |
|
---|
|
Create an instance.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
dict |
|
||
tuple; (list, list) |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
NoneType |
|
||
|
|||
dict of string to string |
|
||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from |
|
|||
HPATH = "instance-add" hash(x) |
|||
HTYPE = constants.HTYPE_INSTANCE hash(x) |
|||
REQ_BGL = False
|
|
|||
Inherited from |
|
|||
Inherited from |
|
Check arguments.
|
ExpandNames for CreateInstance. Figure out the right locks for instance creation.
|
Declare LU locking needs for a level While most LUs can just declare their locking needs at ExpandNames time, sometimes there's the need to calculate some locks after having acquired the ones before. This function is called just before acquiring locks at a particular level, but after acquiring the ones at lower levels, and permits such calculations. It can be used to modify self.needed_locks, and by default it does nothing. This function is only called if you have something already set in self.needed_locks for the level.
|
Build hooks env. This runs on master, primary and secondary nodes of the instance.
|
Build hooks nodes.
|
Reads the export information from disk. It will override the opcode source node and path with the actual information, if these two were not specified before.
|
Use export parameters as defaults. In case the opcode doesn't specify (as in override) some instance parameters, then try to use them from the export information, if that declares them. |
Check prerequisites.
|
Removes degraded disks and instance. It optionally checks whether disks are degraded. If the disks are degraded, they are removed and the instance is also removed from the configuration. If If
|
Run OS scripts If necessary, disks are paused. It handles instance create, import, and remote import.
|
Returns the OS scripts environment for the helper VM
|
Updates the OS parameter 'os-install-package' for an instance. The OS install package is an archive containing an OS definition and a file containing the environment variables needed to run the OS scripts. The OS install package is served by the metadata daemon to the instances, so the OS scripts can run inside the virtualized environment.
|
Runs the OS scripts inside a safe virtualized environment. The virtualized environment reuses the instance and temporarily creates a disk onto which the image of the helper VM is dumped. The temporary disk is used to boot the helper VM. The OS scripts are passed to the helper VM through the metadata daemon and the OS install package.
|
Create and add the instance to the cluster.
|
Prepare the LU to run again. This method is called if the Exec failed for temporarily lacking resources. It is expected to change the state of the LU so that it can be tried again, and also change its locking policy to acquire more resources to have a better chance of suceeding in the retry.
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Tue Apr 12 13:38:39 2016 | http://epydoc.sourceforge.net |