4 # Copyright (C) 2006, 2007 Google Inc.
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful, but
12 # WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 # General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, write to the Free Software
18 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 """Cluster related commands"""
23 # pylint: disable-msg=W0401,W0613,W0614,C0103
24 # W0401: Wildcard import ganeti.cli
25 # W0613: Unused argument, since all functions follow the same API
26 # W0614: Unused import %s from wildcard import (since we need cli)
27 # C0103: Invalid name gnt-cluster
34 from ganeti.cli import *
35 from ganeti import opcodes
36 from ganeti import constants
37 from ganeti import errors
38 from ganeti import utils
39 from ganeti import bootstrap
40 from ganeti import ssh
41 from ganeti import objects
42 from ganeti import uidpool
43 from ganeti import compat
47 def InitCluster(opts, args):
48 """Initialize the cluster.
50 @param opts: the command line options selected by the user
52 @param args: should contain only one element, the desired
55 @return: the desired exit code
58 if not opts.lvm_storage and opts.vg_name:
59 ToStderr("Options --no-lvm-storage and --vg-name conflict.")
62 vg_name = opts.vg_name
63 if opts.lvm_storage and not opts.vg_name:
64 vg_name = constants.DEFAULT_VG
66 hvlist = opts.enabled_hypervisors
68 hvlist = constants.DEFAULT_ENABLED_HYPERVISOR
69 hvlist = hvlist.split(",")
71 hvparams = dict(opts.hvparams)
72 beparams = opts.beparams
73 nicparams = opts.nicparams
75 # prepare beparams dict
76 beparams = objects.FillDict(constants.BEC_DEFAULTS, beparams)
77 utils.ForceDictType(beparams, constants.BES_PARAMETER_TYPES)
79 # prepare nicparams dict
80 nicparams = objects.FillDict(constants.NICC_DEFAULTS, nicparams)
81 utils.ForceDictType(nicparams, constants.NICS_PARAMETER_TYPES)
83 # prepare hvparams dict
84 for hv in constants.HYPER_TYPES:
85 if hv not in hvparams:
87 hvparams[hv] = objects.FillDict(constants.HVC_DEFAULTS[hv], hvparams[hv])
88 utils.ForceDictType(hvparams[hv], constants.HVS_PARAMETER_TYPES)
90 if opts.candidate_pool_size is None:
91 opts.candidate_pool_size = constants.MASTER_POOL_SIZE_DEFAULT
93 if opts.mac_prefix is None:
94 opts.mac_prefix = constants.DEFAULT_MAC_PREFIX
96 uid_pool = opts.uid_pool
97 if uid_pool is not None:
98 uid_pool = uidpool.ParseUidPool(uid_pool)
100 bootstrap.InitCluster(cluster_name=args[0],
101 secondary_ip=opts.secondary_ip,
103 mac_prefix=opts.mac_prefix,
104 master_netdev=opts.master_netdev,
105 file_storage_dir=opts.file_storage_dir,
106 enabled_hypervisors=hvlist,
110 candidate_pool_size=opts.candidate_pool_size,
111 modify_etc_hosts=opts.modify_etc_hosts,
112 modify_ssh_setup=opts.modify_ssh_setup,
113 maintain_node_health=opts.maintain_node_health,
116 op = opcodes.OpPostInitCluster()
117 SubmitOpCode(op, opts=opts)
122 def DestroyCluster(opts, args):
123 """Destroy the cluster.
125 @param opts: the command line options selected by the user
127 @param args: should be an empty list
129 @return: the desired exit code
132 if not opts.yes_do_it:
133 ToStderr("Destroying a cluster is irreversible. If you really want"
134 " destroy this cluster, supply the --yes-do-it option.")
137 op = opcodes.OpDestroyCluster()
138 master = SubmitOpCode(op, opts=opts)
139 # if we reached this, the opcode didn't fail; we can proceed to
140 # shutdown all the daemons
141 bootstrap.FinalizeClusterDestroy(master)
145 def RenameCluster(opts, args):
146 """Rename the cluster.
148 @param opts: the command line options selected by the user
150 @param args: should contain only one element, the new cluster name
152 @return: the desired exit code
157 usertext = ("This will rename the cluster to '%s'. If you are connected"
158 " over the network to the cluster name, the operation is very"
159 " dangerous as the IP address will be removed from the node"
160 " and the change may not go through. Continue?") % name
161 if not AskUser(usertext):
164 op = opcodes.OpRenameCluster(name=name)
165 SubmitOpCode(op, opts=opts)
169 def RedistributeConfig(opts, args):
170 """Forces push of the cluster configuration.
172 @param opts: the command line options selected by the user
174 @param args: empty list
176 @return: the desired exit code
179 op = opcodes.OpRedistributeConfig()
180 SubmitOrSend(op, opts)
184 def ShowClusterVersion(opts, args):
185 """Write version of ganeti software to the standard output.
187 @param opts: the command line options selected by the user
189 @param args: should be an empty list
191 @return: the desired exit code
195 result = cl.QueryClusterInfo()
196 ToStdout("Software version: %s", result["software_version"])
197 ToStdout("Internode protocol: %s", result["protocol_version"])
198 ToStdout("Configuration format: %s", result["config_version"])
199 ToStdout("OS api version: %s", result["os_api_version"])
200 ToStdout("Export interface: %s", result["export_version"])
204 def ShowClusterMaster(opts, args):
205 """Write name of master node to the standard output.
207 @param opts: the command line options selected by the user
209 @param args: should be an empty list
211 @return: the desired exit code
214 master = bootstrap.GetMaster()
219 def _PrintGroupedParams(paramsdict, level=1, roman=False):
220 """Print Grouped parameters (be, nic, disk) by group.
222 @type paramsdict: dict of dicts
223 @param paramsdict: {group: {param: value, ...}, ...}
225 @param level: Level of indention
229 for item, val in sorted(paramsdict.items()):
230 if isinstance(val, dict):
231 ToStdout("%s- %s:", indent, item)
232 _PrintGroupedParams(val, level=level + 1, roman=roman)
233 elif roman and isinstance(val, int):
234 ToStdout("%s %s: %s", indent, item, compat.TryToRoman(val))
236 ToStdout("%s %s: %s", indent, item, val)
239 def ShowClusterConfig(opts, args):
240 """Shows cluster information.
242 @param opts: the command line options selected by the user
244 @param args: should be an empty list
246 @return: the desired exit code
250 result = cl.QueryClusterInfo()
252 ToStdout("Cluster name: %s", result["name"])
253 ToStdout("Cluster UUID: %s", result["uuid"])
255 ToStdout("Creation time: %s", utils.FormatTime(result["ctime"]))
256 ToStdout("Modification time: %s", utils.FormatTime(result["mtime"]))
258 ToStdout("Master node: %s", result["master"])
260 ToStdout("Architecture (this node): %s (%s)",
261 result["architecture"][0], result["architecture"][1])
264 tags = utils.CommaJoin(utils.NiceSort(result["tags"]))
268 ToStdout("Tags: %s", tags)
270 ToStdout("Default hypervisor: %s", result["default_hypervisor"])
271 ToStdout("Enabled hypervisors: %s",
272 utils.CommaJoin(result["enabled_hypervisors"]))
274 ToStdout("Hypervisor parameters:")
275 _PrintGroupedParams(result["hvparams"])
277 ToStdout("OS-specific hypervisor parameters:")
278 _PrintGroupedParams(result["os_hvp"])
280 ToStdout("OS parameters:")
281 _PrintGroupedParams(result["osparams"])
283 ToStdout("Cluster parameters:")
284 ToStdout(" - candidate pool size: %s",
285 compat.TryToRoman(result["candidate_pool_size"],
286 convert=opts.roman_integers))
287 ToStdout(" - master netdev: %s", result["master_netdev"])
288 ToStdout(" - lvm volume group: %s", result["volume_group_name"])
289 ToStdout(" - file storage path: %s", result["file_storage_dir"])
290 ToStdout(" - maintenance of node health: %s",
291 result["maintain_node_health"])
292 ToStdout(" - uid pool: %s",
293 uidpool.FormatUidPool(result["uid_pool"],
294 roman=opts.roman_integers))
296 ToStdout("Default instance parameters:")
297 _PrintGroupedParams(result["beparams"], roman=opts.roman_integers)
299 ToStdout("Default nic parameters:")
300 _PrintGroupedParams(result["nicparams"], roman=opts.roman_integers)
305 def ClusterCopyFile(opts, args):
306 """Copy a file from master to some nodes.
308 @param opts: the command line options selected by the user
310 @param args: should contain only one element, the path of
311 the file to be copied
313 @return: the desired exit code
317 if not os.path.exists(filename):
318 raise errors.OpPrereqError("No such filename '%s'" % filename,
323 cluster_name = cl.QueryConfigValues(["cluster_name"])[0]
325 results = GetOnlineNodes(nodes=opts.nodes, cl=cl, filter_master=True,
326 secondary_ips=opts.use_replication_network)
328 srun = ssh.SshRunner(cluster_name=cluster_name)
330 if not srun.CopyFileToNode(node, filename):
331 ToStderr("Copy of file %s to node %s failed", filename, node)
336 def RunClusterCommand(opts, args):
337 """Run a command on some nodes.
339 @param opts: the command line options selected by the user
341 @param args: should contain the command to be run and its arguments
343 @return: the desired exit code
348 command = " ".join(args)
350 nodes = GetOnlineNodes(nodes=opts.nodes, cl=cl)
352 cluster_name, master_node = cl.QueryConfigValues(["cluster_name",
355 srun = ssh.SshRunner(cluster_name=cluster_name)
357 # Make sure master node is at list end
358 if master_node in nodes:
359 nodes.remove(master_node)
360 nodes.append(master_node)
363 result = srun.Run(name, "root", command)
364 ToStdout("------------------------------------------------")
365 ToStdout("node: %s", name)
366 ToStdout("%s", result.output)
367 ToStdout("return code = %s", result.exit_code)
372 def VerifyCluster(opts, args):
373 """Verify integrity of cluster, performing various test on nodes.
375 @param opts: the command line options selected by the user
377 @param args: should be an empty list
379 @return: the desired exit code
383 if opts.skip_nplusone_mem:
384 skip_checks.append(constants.VERIFY_NPLUSONE_MEM)
385 op = opcodes.OpVerifyCluster(skip_checks=skip_checks,
386 verbose=opts.verbose,
387 error_codes=opts.error_codes,
388 debug_simulate_errors=opts.simulate_errors)
389 if SubmitOpCode(op, opts=opts):
395 def VerifyDisks(opts, args):
396 """Verify integrity of cluster disks.
398 @param opts: the command line options selected by the user
400 @param args: should be an empty list
402 @return: the desired exit code
405 op = opcodes.OpVerifyDisks()
406 result = SubmitOpCode(op, opts=opts)
407 if not isinstance(result, (list, tuple)) or len(result) != 3:
408 raise errors.ProgrammerError("Unknown result type for OpVerifyDisks")
410 bad_nodes, instances, missing = result
412 retcode = constants.EXIT_SUCCESS
415 for node, text in bad_nodes.items():
416 ToStdout("Error gathering data on node %s: %s",
417 node, utils.SafeEncode(text[-400:]))
419 ToStdout("You need to fix these nodes first before fixing instances")
422 for iname in instances:
425 op = opcodes.OpActivateInstanceDisks(instance_name=iname)
427 ToStdout("Activating disks for instance '%s'", iname)
428 SubmitOpCode(op, opts=opts)
429 except errors.GenericError, err:
430 nret, msg = FormatError(err)
432 ToStderr("Error activating disks for instance %s: %s", iname, msg)
435 for iname, ival in missing.iteritems():
436 all_missing = compat.all(ival, lambda x: x[0] in bad_nodes)
438 ToStdout("Instance %s cannot be verified as it lives on"
439 " broken nodes", iname)
441 ToStdout("Instance %s has missing logical volumes:", iname)
443 for node, vol in ival:
444 if node in bad_nodes:
445 ToStdout("\tbroken node %s /dev/xenvg/%s", node, vol)
447 ToStdout("\t%s /dev/xenvg/%s", node, vol)
448 ToStdout("You need to run replace_disks for all the above"
449 " instances, if this message persist after fixing nodes.")
455 def RepairDiskSizes(opts, args):
456 """Verify sizes of cluster disks.
458 @param opts: the command line options selected by the user
460 @param args: optional list of instances to restrict check to
462 @return: the desired exit code
465 op = opcodes.OpRepairDiskSizes(instances=args)
466 SubmitOpCode(op, opts=opts)
470 def MasterFailover(opts, args):
471 """Failover the master node.
473 This command, when run on a non-master node, will cause the current
474 master to cease being master, and the non-master to become new
477 @param opts: the command line options selected by the user
479 @param args: should be an empty list
481 @return: the desired exit code
485 usertext = ("This will perform the failover even if most other nodes"
486 " are down, or if this node is outdated. This is dangerous"
487 " as it can lead to a non-consistent cluster. Check the"
488 " gnt-cluster(8) man page before proceeding. Continue?")
489 if not AskUser(usertext):
492 return bootstrap.MasterFailover(no_voting=opts.no_voting)
495 def SearchTags(opts, args):
496 """Searches the tags on all the cluster.
498 @param opts: the command line options selected by the user
500 @param args: should contain only one element, the tag pattern
502 @return: the desired exit code
505 op = opcodes.OpSearchTags(pattern=args[0])
506 result = SubmitOpCode(op, opts=opts)
509 result = list(result)
511 for path, tag in result:
512 ToStdout("%s %s", path, tag)
515 def _RenewCrypto(new_cluster_cert, new_rapi_cert, rapi_cert_filename,
516 new_confd_hmac_key, new_cds, cds_filename,
518 """Renews cluster certificates, keys and secrets.
520 @type new_cluster_cert: bool
521 @param new_cluster_cert: Whether to generate a new cluster certificate
522 @type new_rapi_cert: bool
523 @param new_rapi_cert: Whether to generate a new RAPI certificate
524 @type rapi_cert_filename: string
525 @param rapi_cert_filename: Path to file containing new RAPI certificate
526 @type new_confd_hmac_key: bool
527 @param new_confd_hmac_key: Whether to generate a new HMAC key
529 @param new_cds: Whether to generate a new cluster domain secret
530 @type cds_filename: string
531 @param cds_filename: Path to file containing new cluster domain secret
533 @param force: Whether to ask user for confirmation
536 if new_rapi_cert and rapi_cert_filename:
537 ToStderr("Only one of the --new-rapi-certficate and --rapi-certificate"
538 " options can be specified at the same time.")
541 if new_cds and cds_filename:
542 ToStderr("Only one of the --new-cluster-domain-secret and"
543 " --cluster-domain-secret options can be specified at"
547 if rapi_cert_filename:
548 # Read and verify new certificate
550 rapi_cert_pem = utils.ReadFile(rapi_cert_filename)
552 OpenSSL.crypto.load_certificate(OpenSSL.crypto.FILETYPE_PEM,
554 except Exception, err: # pylint: disable-msg=W0703
555 ToStderr("Can't load new RAPI certificate from %s: %s" %
556 (rapi_cert_filename, str(err)))
560 OpenSSL.crypto.load_privatekey(OpenSSL.crypto.FILETYPE_PEM, rapi_cert_pem)
561 except Exception, err: # pylint: disable-msg=W0703
562 ToStderr("Can't load new RAPI private key from %s: %s" %
563 (rapi_cert_filename, str(err)))
571 cds = utils.ReadFile(cds_filename)
572 except Exception, err: # pylint: disable-msg=W0703
573 ToStderr("Can't load new cluster domain secret from %s: %s" %
574 (cds_filename, str(err)))
580 usertext = ("This requires all daemons on all nodes to be restarted and"
581 " may take some time. Continue?")
582 if not AskUser(usertext):
585 def _RenewCryptoInner(ctx):
586 ctx.feedback_fn("Updating certificates and keys")
587 bootstrap.GenerateClusterCrypto(new_cluster_cert, new_rapi_cert,
590 rapi_cert_pem=rapi_cert_pem,
596 files_to_copy.append(constants.NODED_CERT_FILE)
598 if new_rapi_cert or rapi_cert_pem:
599 files_to_copy.append(constants.RAPI_CERT_FILE)
601 if new_confd_hmac_key:
602 files_to_copy.append(constants.CONFD_HMAC_KEY)
605 files_to_copy.append(constants.CLUSTER_DOMAIN_SECRET_FILE)
608 for node_name in ctx.nonmaster_nodes:
609 ctx.feedback_fn("Copying %s to %s" %
610 (", ".join(files_to_copy), node_name))
611 for file_name in files_to_copy:
612 ctx.ssh.CopyFileToNode(node_name, file_name)
614 RunWhileClusterStopped(ToStdout, _RenewCryptoInner)
616 ToStdout("All requested certificates and keys have been replaced."
617 " Running \"gnt-cluster verify\" now is recommended.")
622 def RenewCrypto(opts, args):
623 """Renews cluster certificates, keys and secrets.
626 return _RenewCrypto(opts.new_cluster_cert,
629 opts.new_confd_hmac_key,
630 opts.new_cluster_domain_secret,
631 opts.cluster_domain_secret,
635 def SetClusterParams(opts, args):
636 """Modify the cluster.
638 @param opts: the command line options selected by the user
640 @param args: should be an empty list
642 @return: the desired exit code
645 if not (not opts.lvm_storage or opts.vg_name or
646 opts.enabled_hypervisors or opts.hvparams or
647 opts.beparams or opts.nicparams or
648 opts.candidate_pool_size is not None or
649 opts.uid_pool is not None or
650 opts.maintain_node_health is not None or
651 opts.add_uids is not None or
652 opts.remove_uids is not None):
653 ToStderr("Please give at least one of the parameters.")
656 vg_name = opts.vg_name
657 if not opts.lvm_storage and opts.vg_name:
658 ToStderr("Options --no-lvm-storage and --vg-name conflict.")
661 if not opts.lvm_storage:
664 hvlist = opts.enabled_hypervisors
665 if hvlist is not None:
666 hvlist = hvlist.split(",")
668 # a list of (name, dict) we can pass directly to dict() (or [])
669 hvparams = dict(opts.hvparams)
670 for hv_params in hvparams.values():
671 utils.ForceDictType(hv_params, constants.HVS_PARAMETER_TYPES)
673 beparams = opts.beparams
674 utils.ForceDictType(beparams, constants.BES_PARAMETER_TYPES)
676 nicparams = opts.nicparams
677 utils.ForceDictType(nicparams, constants.NICS_PARAMETER_TYPES)
680 mnh = opts.maintain_node_health
682 uid_pool = opts.uid_pool
683 if uid_pool is not None:
684 uid_pool = uidpool.ParseUidPool(uid_pool)
686 add_uids = opts.add_uids
687 if add_uids is not None:
688 add_uids = uidpool.ParseUidPool(add_uids)
690 remove_uids = opts.remove_uids
691 if remove_uids is not None:
692 remove_uids = uidpool.ParseUidPool(remove_uids)
694 op = opcodes.OpSetClusterParams(vg_name=vg_name,
695 enabled_hypervisors=hvlist,
700 candidate_pool_size=opts.candidate_pool_size,
701 maintain_node_health=mnh,
704 remove_uids=remove_uids)
705 SubmitOpCode(op, opts=opts)
709 def QueueOps(opts, args):
712 @param opts: the command line options selected by the user
714 @param args: should contain only one element, the subcommand
716 @return: the desired exit code
721 if command in ("drain", "undrain"):
722 drain_flag = command == "drain"
723 client.SetQueueDrainFlag(drain_flag)
724 elif command == "info":
725 result = client.QueryConfigValues(["drain_flag"])
730 ToStdout("The drain flag is %s" % val)
732 raise errors.OpPrereqError("Command '%s' is not valid." % command,
738 def _ShowWatcherPause(until):
739 if until is None or until < time.time():
740 ToStdout("The watcher is not paused.")
742 ToStdout("The watcher is paused until %s.", time.ctime(until))
745 def WatcherOps(opts, args):
746 """Watcher operations.
748 @param opts: the command line options selected by the user
750 @param args: should contain only one element, the subcommand
752 @return: the desired exit code
758 if command == "continue":
759 client.SetWatcherPause(None)
760 ToStdout("The watcher is no longer paused.")
762 elif command == "pause":
764 raise errors.OpPrereqError("Missing pause duration", errors.ECODE_INVAL)
766 result = client.SetWatcherPause(time.time() + ParseTimespec(args[1]))
767 _ShowWatcherPause(result)
769 elif command == "info":
770 result = client.QueryConfigValues(["watcher_pause"])
771 _ShowWatcherPause(result[0])
774 raise errors.OpPrereqError("Command '%s' is not valid." % command,
782 InitCluster, [ArgHost(min=1, max=1)],
783 [BACKEND_OPT, CP_SIZE_OPT, ENABLED_HV_OPT, GLOBAL_FILEDIR_OPT,
784 HVLIST_OPT, MAC_PREFIX_OPT, MASTER_NETDEV_OPT, NIC_PARAMS_OPT,
785 NOLVM_STORAGE_OPT, NOMODIFY_ETCHOSTS_OPT, NOMODIFY_SSH_SETUP_OPT,
786 SECONDARY_IP_OPT, VG_NAME_OPT, MAINTAIN_NODE_HEALTH_OPT,
788 "[opts...] <cluster_name>", "Initialises a new cluster configuration"),
790 DestroyCluster, ARGS_NONE, [YES_DOIT_OPT],
791 "", "Destroy cluster"),
793 RenameCluster, [ArgHost(min=1, max=1)],
796 "Renames the cluster"),
798 RedistributeConfig, ARGS_NONE, [SUBMIT_OPT],
799 "", "Forces a push of the configuration file and ssconf files"
800 " to the nodes in the cluster"),
802 VerifyCluster, ARGS_NONE,
803 [VERBOSE_OPT, DEBUG_SIMERR_OPT, ERROR_CODES_OPT, NONPLUS1_OPT],
804 "", "Does a check on the cluster configuration"),
806 VerifyDisks, ARGS_NONE, [],
807 "", "Does a check on the cluster disk status"),
808 'repair-disk-sizes': (
809 RepairDiskSizes, ARGS_MANY_INSTANCES, [],
810 "", "Updates mismatches in recorded disk sizes"),
812 MasterFailover, ARGS_NONE, [NOVOTING_OPT],
813 "", "Makes the current node the master"),
815 ShowClusterVersion, ARGS_NONE, [],
816 "", "Shows the cluster version"),
818 ShowClusterMaster, ARGS_NONE, [],
819 "", "Shows the cluster master"),
821 ClusterCopyFile, [ArgFile(min=1, max=1)],
822 [NODE_LIST_OPT, USE_REPL_NET_OPT],
823 "[-n node...] <filename>", "Copies a file to all (or only some) nodes"),
825 RunClusterCommand, [ArgCommand(min=1)],
827 "[-n node...] <command>", "Runs a command on all (or only some) nodes"),
829 ShowClusterConfig, ARGS_NONE, [ROMAN_OPT],
830 "[--roman]", "Show cluster configuration"),
832 ListTags, ARGS_NONE, [], "", "List the tags of the cluster"),
834 AddTags, [ArgUnknown()], [TAG_SRC_OPT],
835 "tag...", "Add tags to the cluster"),
837 RemoveTags, [ArgUnknown()], [TAG_SRC_OPT],
838 "tag...", "Remove tags from the cluster"),
840 SearchTags, [ArgUnknown(min=1, max=1)],
841 [], "", "Searches the tags on all objects on"
842 " the cluster for a given pattern (regex)"),
845 [ArgChoice(min=1, max=1, choices=["drain", "undrain", "info"])],
846 [], "drain|undrain|info", "Change queue properties"),
849 [ArgChoice(min=1, max=1, choices=["pause", "continue", "info"]),
850 ArgSuggest(min=0, max=1, choices=["30m", "1h", "4h"])],
852 "{pause <timespec>|continue|info}", "Change watcher properties"),
854 SetClusterParams, ARGS_NONE,
855 [BACKEND_OPT, CP_SIZE_OPT, ENABLED_HV_OPT, HVLIST_OPT,
856 NIC_PARAMS_OPT, NOLVM_STORAGE_OPT, VG_NAME_OPT, MAINTAIN_NODE_HEALTH_OPT,
857 UIDPOOL_OPT, ADD_UIDS_OPT, REMOVE_UIDS_OPT],
859 "Alters the parameters of the cluster"),
861 RenewCrypto, ARGS_NONE,
862 [NEW_CLUSTER_CERT_OPT, NEW_RAPI_CERT_OPT, RAPI_CERT_OPT,
863 NEW_CONFD_HMAC_KEY_OPT, FORCE_OPT,
864 NEW_CLUSTER_DOMAIN_SECRET_OPT, CLUSTER_DOMAIN_SECRET_OPT],
866 "Renews cluster certificates, keys and secrets"),
870 if __name__ == '__main__':
871 sys.exit(GenericMain(commands, override={"tag_type": constants.TAG_CLUSTER}))