Commit c28502b1 authored by Iustin Pop's avatar Iustin Pop
Browse files

Rename masterfailover to master-failover

Most (all?) of our commands use dash-separator: replace-disks,
verify-disks, add-tags, etc. “gnt-cluster masterfailover” is an old
exception to this rule.

The patch replaces it with master-failover, add a compatiblity alias,
and updates the documentation for this change.
Signed-off-by: default avatarIustin Pop <>
Reviewed-by: default avatarGuido Trotter <>
parent 130f0966
......@@ -680,7 +680,7 @@ Failing over the master node
If you want to promote a different node to the master role (for whatever
reason), run on any other master-candidate node the command::
gnt-cluster masterfailover
gnt-cluster master-failover
and the node you ran it on is now the new master. In case you try to run
this on a non master-candidate node, you will get an error telling you
......@@ -3965,7 +3965,7 @@ class LUSetNodeParams(LogicalUnit):
# we can't change the master's node flags
if self.op.node_name == self.cfg.GetMasterNode():
raise errors.OpPrereqError("The master role can be changed"
" only via masterfailover",
" only via master-failover",
......@@ -75,8 +75,8 @@
The only action that can be done without the master daemon is
the failover of the master role to another node in the
cluster, via the <command>gnt-cluster masterfailover</command>
cluster, via the <command>gnt-cluster
master-failover</command> command.
......@@ -110,7 +110,7 @@
<para>The node receives the full cluster configuration
(configuration file and jobs) and can become a master
via the <command>gnt-cluster masterfailover</command>
via the <command>gnt-cluster master-failover</command>
command. Nodes that are not in this state cannot
transition into the master role due to missing
......@@ -564,10 +564,10 @@
......@@ -320,16 +320,16 @@ def TestClusterBurnin():
def TestClusterMasterFailover():
"""gnt-cluster masterfailover"""
"""gnt-cluster master-failover"""
master = qa_config.GetMasterNode()
failovermaster = qa_config.AcquireNode(exclude=master)
cmd = ['gnt-cluster', 'masterfailover']
cmd = ['gnt-cluster', 'master-failover']
utils.ShellQuoteArgs(cmd)).wait(), 0)
cmd = ['gnt-cluster', 'masterfailover']
cmd = ['gnt-cluster', 'master-failover']
utils.ShellQuoteArgs(cmd)).wait(), 0)
......@@ -854,7 +854,7 @@ commands = {
'repair-disk-sizes': (
RepairDiskSizes, ARGS_MANY_INSTANCES, [],
"", "Updates mismatches in recorded disk sizes"),
'masterfailover': (
'master-failover': (
MasterFailover, ARGS_NONE, [NOVOTING_OPT],
"", "Makes the current node the master"),
'version': (
......@@ -914,5 +914,12 @@ commands = {
#: dictionary with aliases for commands
aliases = {
'masterfailover': 'master-failover',
if __name__ == '__main__':
sys.exit(GenericMain(commands, override={"tag_type": constants.TAG_CLUSTER}))
sys.exit(GenericMain(commands, override={"tag_type": constants.TAG_CLUSTER},
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment