Package ganeti :: Package cmdlib :: Module cluster
[hide private]
[frames] | no frames]

Module cluster

source code

Logical units dealing with the cluster.

Classes [hide private]
  LUClusterRenewCrypto
Renew the cluster's crypto tokens.
  LUClusterActivateMasterIp
Activate the master IP on the master node.
  LUClusterDeactivateMasterIp
Deactivate the master IP on the master node.
  LUClusterConfigQuery
Return configuration values.
  LUClusterDestroy
Logical unit for destroying the cluster.
  LUClusterPostInit
Logical unit for running hooks after cluster initialization.
  ClusterQuery
  LUClusterQuery
Query cluster configuration.
  LUClusterRedistConf
Force the redistribution of cluster configuration.
  LUClusterRename
Rename the cluster.
  LUClusterRepairDiskSizes
Verifies the cluster disks sizes.
  LUClusterSetParams
Change the parameters of the cluster.
  LUClusterVerify
Submits all jobs necessary to verify the cluster.
  _VerifyErrors
Mix-in for cluster/group verify LUs.
  LUClusterVerifyConfig
Verifies the cluster config.
  LUClusterVerifyGroup
Verifies the status of a node group.
  LUClusterVerifyDisks
Verifies the cluster disks status.
Functions [hide private]
 
_ValidateNetmask(cfg, netmask)
Checks if a netmask is valid.
source code
 
CheckFileBasedStoragePathVsEnabledDiskTemplates(logging_warn_fn, file_storage_dir, enabled_disk_templates, file_disk_template)
Checks whether the given file-based storage directory is acceptable.
source code
 
CheckFileStoragePathVsEnabledDiskTemplates(logging_warn_fn, file_storage_dir, enabled_disk_templates)
Checks whether the given file storage directory is acceptable.
source code
 
CheckSharedFileStoragePathVsEnabledDiskTemplates(logging_warn_fn, file_storage_dir, enabled_disk_templates)
Checks whether the given shared file storage directory is acceptable.
source code
 
CheckGlusterStoragePathVsEnabledDiskTemplates(logging_warn_fn, file_storage_dir, enabled_disk_templates)
Checks whether the given gluster storage directory is acceptable.
source code
 
CheckCompressionTools(tools)
Check whether the provided compression tools look like executables.
source code
list of (origin, hypervisor, parameters)
_GetAllHypervisorParameters(cluster, instances)
Compute the set of all hypervisor parameters.
source code

Imports: copy, itertools, logging, operator, os, re, time, compat, constants, errors, hypervisor, locking, masterd, netutils, objects, opcodes, pathutils, query, rpc, runtime, ssh, uidpool, utils, vcluster, NoHooksLU, QueryBase, LogicalUnit, ResultWithJobs, ShareAll, RunPostHook, ComputeAncillaryFiles, RedistributeAncillaryFiles, UploadHelper, GetWantedInstances, MergeAndVerifyHvState, MergeAndVerifyDiskState, GetUpdatedIPolicy, ComputeNewInstanceViolations, GetUpdatedParams, CheckOSParams, CheckHVParams, AdjustCandidatePool, CheckNodePVs, ComputeIPolicyInstanceViolation, AnnotateDiskParams, SupportsOob, CheckIpolicyVsDiskTemplates, CheckDiskAccessModeValidity, GetClientCertDigest, AddInstanceCommunicationNetworkOp, ConnectInstanceCommunicationNetworkOp, CheckImageValidity, CheckDiskAccessModeConsistency, EnsureKvmdOnNodes, WarnAboutFailedSshUpdates, ganeti


Function Details [hide private]

_ValidateNetmask(cfg, netmask)

source code 

Checks if a netmask is valid.

Parameters:
Raises:

CheckFileBasedStoragePathVsEnabledDiskTemplates(logging_warn_fn, file_storage_dir, enabled_disk_templates, file_disk_template)

source code 

Checks whether the given file-based storage directory is acceptable.

Note: This function is public, because it is also used in bootstrap.py.

Parameters:
  • logging_warn_fn (function) - function which accepts a string and logs it
  • file_storage_dir (string) - the directory to be used for file-based instances
  • enabled_disk_templates (list of string) - the list of enabled disk templates
  • file_disk_template (string) - the file-based disk template for which the path should be checked

CheckFileStoragePathVsEnabledDiskTemplates(logging_warn_fn, file_storage_dir, enabled_disk_templates)

source code 

Checks whether the given file storage directory is acceptable.

See Also: CheckFileBasedStoragePathVsEnabledDiskTemplates

CheckSharedFileStoragePathVsEnabledDiskTemplates(logging_warn_fn, file_storage_dir, enabled_disk_templates)

source code 

Checks whether the given shared file storage directory is acceptable.

See Also: CheckFileBasedStoragePathVsEnabledDiskTemplates

CheckGlusterStoragePathVsEnabledDiskTemplates(logging_warn_fn, file_storage_dir, enabled_disk_templates)

source code 

Checks whether the given gluster storage directory is acceptable.

See Also: CheckFileBasedStoragePathVsEnabledDiskTemplates

CheckCompressionTools(tools)

source code 

Check whether the provided compression tools look like executables.

Parameters:
  • tools (list of string) - The tools provided as opcode input

_GetAllHypervisorParameters(cluster, instances)

source code 

Compute the set of all hypervisor parameters.

Parameters:
Returns: list of (origin, hypervisor, parameters)
a list with all parameters found, indicating the hypervisor they apply to, and the origin (can be "cluster", "os X", or "instance Y")