Module cluster
source code
Logical units dealing with the cluster.
string
|
_UpdateMasterClientCert(lu,
master_uuid,
cluster,
feedback_fn,
client_cert=pathutils.NODED_CLIENT_CERT_FILE,
client_cert_tmp=pathutils.NODED_CLIENT_CERT_FILE_TMP)
Renews the master's client certificate and propagates the config. |
source code
|
|
|
|
|
|
|
|
|
|
list of (origin, hypervisor, parameters)
|
|
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,
CheckDiskAccessModeConsistency,
CreateNewClientCert,
EnsureKvmdOnNodes,
ganeti
_UpdateMasterClientCert(lu,
master_uuid,
cluster,
feedback_fn,
client_cert=pathutils.NODED_CLIENT_CERT_FILE,
client_cert_tmp=pathutils.NODED_CLIENT_CERT_FILE_TMP)
| source code
|
Renews the master's client certificate and propagates the config.
- Parameters:
lu (LogicalUnit ) - the logical unit holding the config
master_uuid (string) - the master node's UUID
cluster (objects.Cluster ) - the cluster's configuration
feedback_fn (function) - feedback functions for config updates
client_cert (string) - the path of the client certificate
client_cert_tmp (string) - the temporary path of the client certificate
- Returns: string
- the digest of the newly created client certificate
|
Checks if a netmask is valid.
- Parameters:
cfg (config.ConfigWriter) - The cluster configuration
netmask (int) - the netmask to be verified
- 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
|
_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")
|