Script cluster_merge
Tool to merge two or more clusters together.
The clusters have to run the same version of Ganeti!
|
MergerData
Container class to hold data used for merger.
|
|
Merger
Handling the merge.
|
|
Flatten(unflattened_list)
Flattens a list. |
|
|
|
|
|
_GROUPS_MERGE = "merge"
|
|
_GROUPS_RENAME = "rename"
|
|
_CLUSTERMERGE_ECID = "clustermerge-ecid"
|
|
_RESTART_ALL = "all"
|
|
_RESTART_UP = "up"
|
|
_RESTART_NONE = "none"
|
|
_RESTART_CHOICES = _RESTART_ALL, _RESTART_UP, _RESTART_NONE
|
|
_PARAMS_STRICT = "strict"
|
|
_PARAMS_WARN = "warn"
|
|
_PARAMS_CHOICES = _PARAMS_STRICT, _PARAMS_WARN
|
|
PAUSE_PERIOD_OPT = cli.cli_option("-p", "--watcher-pause-perio...
|
|
GROUPS_OPT = cli.cli_option("--groups", default= None, metavar...
|
|
PARAMS_OPT = cli.cli_option("--parameter-conflicts", default= ...
|
|
RESTART_OPT = cli.cli_option("--restart", default= _RESTART_AL...
|
|
SKIP_STOP_INSTANCES_OPT = cli.cli_option("--skip-stop-instance...
|
Imports:
logging,
os,
optparse,
shutil,
sys,
tempfile,
cli,
config,
constants,
errors,
ssh,
utils,
pathutils,
compat
Flatten(unflattened_list)
|
|
Flattens a list.
- Parameters:
unflattened_list - A list of unflattened list objects.
- Returns:
- A flattened list
|
PAUSE_PERIOD_OPT
- Value:
cli.cli_option("-p", "--watcher-pause-period", default= 1800, action=
"store", type= "int", dest= "pause_period", help= ("Amount of time in
seconds watcher" " should be suspended from running"))
|
|
GROUPS_OPT
- Value:
cli.cli_option("--groups", default= None, metavar= "STRATEGY", choices
= (_GROUPS_MERGE, _GROUPS_RENAME), dest= "groups", help= ("How to hand
le groups that have the" " same name (One of: %s/%s)" %(_GROUPS_MERGE,
_GROUPS_RENAME)))
|
|
PARAMS_OPT
- Value:
cli.cli_option("--parameter-conflicts", default= _PARAMS_STRICT, metav
ar= "STRATEGY", choices= _PARAMS_CHOICES, dest= "params", help= ("How
to handle params that have" " different values (One of: %s/%s)" % _PAR
AMS_CHOICES))
|
|
RESTART_OPT
- Value:
cli.cli_option("--restart", default= _RESTART_ALL, metavar= "STRATEGY"
, choices= _RESTART_CHOICES, dest= "restart", help= ("How to handle re
starting instances" " same name (One of: %s/%s/%s)" % _RESTART_CHOICES
))
|
|
SKIP_STOP_INSTANCES_OPT
- Value:
cli.cli_option("--skip-stop-instances", default= True, action= "store_
false", dest= "stop_instances", help= ("Don't stop the instances on th
e clusters, just check " "that none is running"))
|
|