From: Dongsheng Yang Date: Fri, 11 Mar 2016 07:39:57 +0000 (-0500) Subject: mon: introduce a comamnd of 'mon rm' X-Git-Tag: v10.1.0~40^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=19c61b1818d4518754eeb76d9982569b82dcf1c8;p=ceph.git mon: introduce a comamnd of 'mon rm' introduce command of 'mon rm' as an alias of 'mon remove' Signed-off-by: Dongsheng Yang --- diff --git a/src/mon/MonCommands.h b/src/mon/MonCommands.h index 446e4af0ad4..bba698706a6 100644 --- a/src/mon/MonCommands.h +++ b/src/mon/MonCommands.h @@ -434,6 +434,9 @@ COMMAND("mon add " \ COMMAND("mon remove " \ "name=name,type=CephString", \ "remove monitor named ", "mon", "rw", "cli,rest") +COMMAND("mon rm " \ + "name=name,type=CephString", \ + "remove monitor named ", "mon", "rw", "cli,rest") /* * OSD commands diff --git a/src/mon/MonmapMonitor.cc b/src/mon/MonmapMonitor.cc index d95455ec2e9..1ff6e06b88b 100644 --- a/src/mon/MonmapMonitor.cc +++ b/src/mon/MonmapMonitor.cc @@ -414,7 +414,8 @@ bool MonmapMonitor::prepare_command(MonOpRequestRef op) dout(0) << __func__ << " proposing new mon." << name << dendl; goto reply; - } else if (prefix == "mon remove") { + } else if (prefix == "mon remove" || + prefix == "mon rm") { string name; cmd_getval(g_ceph_context, cmdmap, "name", name); if (!monmap.contains(name)) {