Module ssconf
source code
Global Configuration data for Ganeti.
This module provides the interface to a special case of cluster
configuration data, which is mostly static and available to all
nodes.
|
SSCONF_LOCK_TIMEOUT = 10
|
|
RE_VALID_SSCONF_NAME = re.compile(r"^[-_a-z0-9]+$")
|
Imports:
sys,
re,
os,
errno,
errors,
constants,
utils,
serializer,
objects,
netutils
Get the master node and my own hostname.
This can be either used for a 'soft' check (compared to CheckMaster,
which exits) or just for computing both at the same time.
The function does not handle any errors, these should be handled in
the caller (errors.ConfigurationError, errors.ResolverError).
- Parameters:
ss - either a sstore.SimpleConfigReader or a sstore.SimpleStore
instance
- Returns: tuple
- a tuple (master node name, my own name)
|
Checks the node setup.
If this is the master, the function will return. Otherwise it will
exit with an exit code based on the node status.
|