| Trees | Indices | Help |
|
|---|
|
|
Functions used by the node daemon
|
|||
|
HooksRunner Hook runner. |
|||
|
IAllocatorRunner IAllocator runner. |
|||
|
DevCacheManager Simple class for managing a cache of block device information. |
|||
|
|||
| ssconf.SimpleStore |
|
||
| ssh.SshRunner |
|
||
| str |
|
||
|
|||
|
|||
| None |
|
||
| tuple |
|
||
| None |
|
||
| None |
|
||
| boolean |
|
||
|
|||
dict
|
|
||
| dict |
|
||
| dict |
|
||
| dict |
|
||
| list |
|
||
| boolean |
|
||
| list |
|
||
| dict |
|
||
| tuple |
|
||
| dict |
|
||
| boolean |
|
||
| boolean |
|
||
| dict |
|
||
|
|||
|
|||
|
|||
| list |
|
||
| boolean |
|
||
| boolean |
|
||
| boolean |
|
||
|
|||
|
|||
|
|||
| tuple |
|
||
|
|||
| boolean |
|
||
|
|||
| str or boolean |
|
||
| boolean |
|
||
| boolean |
|
||
| boolean |
|
||
| disk |
|
||
|
|||
| None or tuple |
|
||
| list |
|
||
| boolean |
|
||
|
|||
|
|||
| int or None |
|
||
| list of objects.OS |
|
||
| objects.OS |
|
||
| dict |
|
||
| (status, result) |
|
||
| string |
|
||
| boolean |
|
||
| boolean |
|
||
| objects.SerializableConfigParser |
|
||
| list of boolean |
|
||
| list |
|
||
| boolean |
|
||
| boolean |
|
||
|
|||
| tuple |
|
||
| tuple (success,) |
|
||
| tuple (success,) |
|
||
| boolean |
|
||
| boolean |
|
||
| boolean |
|
||
| boolean |
|
||
| tuple (success, message) |
|
||
| tuple (success, message) |
|
||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
_ALLOWED_UPLOAD_FILES = _BuildUploadFileList()denotes which files are accepted in the UploadFile function |
|||
Imports: os, shutil, time, stat, errno, re, subprocess, random, logging, tempfile, zlib, base64, errors, utils, ssh, hypervisor, constants, bdev, objects, ssconf
|
|||
Simple wrapper to return a SimpleStore.
|
Simple wrapper to return an SshRunner.
|
Unpacks data compressed by the RPC client.
|
Removes all regular files in a directory.
|
Build the list of allowed upload files. This is abstracted so that it's built only once at module import time. |
Returns master information. This is an utility function to compute master information, either for consumption here or from the node daemon.
|
Activate local node as master node. The function will always try activate the IP address of the master (unless someone else has it). It will also start the master daemons, based on the start_daemons parameter.
|
Deactivate this node as master. The function will always try to deactivate the IP address of the master. It will also stop the master daemons depending on the stop_daemons parameter.
|
Joins this node to the cluster. This does the following:
|
Cleans up and remove the current node. This function cleans up and prepares the current node to be removed from the cluster. If processing is successful, then it raises an errors.QuitGanetiException which is used as a special case to shutdown the node daemon. |
Gives back a hash with different information about the node.
|
Verify the status of the local node. Based on the input If the filelist key is present, this list of files is checksummed and the file/checksum pairs are returned. If the nodelist key is present, we check that we have connectivity via ssh with the target nodes (and check the hostname report). If the node-net-test key is present, we check that we have connectivity to the given nodes via both primary IP and, if applicable, secondary IPs.
|
Compute list of logical volumes and their size.
|
List the volume groups and their size.
|
List all volumes on this node.
|
Check if a list of bridges exist on the current node.
|
Provides a list of instances.
|
Gives back the information about an instance as a dictionary.
|
Gives whether an instance can be migrated.
|
Gather data about all instances. This is the equivalent of GetInstanceInfo, except that it computes data for all instances at once, thus being faster if one needs data about more than one instance.
|
Add an OS to an instance.
|
Run the OS rename script for an instance.
|
Get information about the volume group.
|
Set up symlinks to a instance's block device. This is an auxiliary function run when an instance is start (on the primary node) or when an instance is migrated (on the target node).
|
Set up an instance's block device(s). This is run on the primary node at instance startup. The block devices must be already assembled.
|
Start an instance.
|
Shut an instance down.
Note: this functions uses polling with a hardcoded timeout. |
Reboot an instance.
|
Gather information about an instance to be migrated.
|
Prepare the node to accept an instance.
|
Finalize any preparation to accept an instance.
|
Migrates an instance to another node.
|
Creates a block device for an instance.
|
Remove a block device.
Note: This is intended to be called recursively. |
Activate a block device for an instance. This is run on the primary and secondary nodes for an instance.
Note: this function is called recursively. |
Activate a block device for an instance. This is a wrapper over _RecursiveAssembleBD.
|
Shut down a block device. First, if the device is assembled (Attach() is successful), then the device is shutdown. Then the children of the device are shutdown. This function is called recursively. Note that we don't cache the children or such, as oppossed to assemble, shutdown of different devices doesn't require that the upper device was active.
|
Extend a mirrored block device.
|
Shrink a mirrored block device.
|
Get the mirroring status of a list of devices.
|
Check if a device is activated. If so, return information about the real device.
|
Check if a device is activated. If it is, return information about the real device.
|
Computes the size of the given disks. If a disk is not found, returns None instead.
|
Write a file to the filesystem. This allows the master to overwrite(!) a file. It will only perform the operation if the file belongs to a list of configuration files.
|
Update all ssconf files. Wrapper around the SimpleStore.WriteFiles. |
Format an EnvironmentError exception. If the
|
Compute and return the API version of a given OS. This function will try to read the API version of the OS given by the 'name' parameter and residing in the 'os_dir' directory.
|
Compute the validity for all OSes.
|
Create an OS instance from disk. This function will return an OS instance if the given name is a valid OS name. Otherwise, it will raise an appropriate errors.InvalidOS exception, detailing why this is not a valid OS.
|
Calculate the environment for an os script.
|
Grow a stack of block devices. This function is called recursively, with the childrens being the first ones to resize.
|
Create a snapshot copy of a block device. This function is called recursively, and the snapshot is actually created just for the leaf lvm backend device.
|
Export a block device snapshot to a remote node.
|
Write out the export configuration information.
|
Get export configuration information.
|
Import an os image into an instance.
|
Return a list of exports currently available on this machine.
|
Remove an existing export from the node.
|
Rename a list of block devices.
|
Checks whether given file_storage_dir is valid. Checks wheter the given file_storage_dir is within the cluster-wide default file_storage_dir stored in SimpleStore. Only paths under that directory are allowed.
|
Create file storage directory.
|
Remove file storage directory. Remove it only if it's empty. If not log an error and return.
|
Rename the file storage directory.
|
Checks whether the given filename is in the queue directory.
|
Updates a file in the queue directory. This is just a wrapper over utils.WriteFile, with proper checking.
|
Renames a job queue file. This is just a wrapper over os.rename with proper checking.
|
Set the drain flag for the queue. This will set or unset the queue drain flag.
Warning: the function always returns True |
Closes the given block devices. This means they will be switched to secondary mode (in case of DRBD).
|
Validates the given hypervisor parameters.
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Fri Sep 3 12:34:35 2010 | http://epydoc.sourceforge.net |