From: Sage Weil Date: Sat, 29 May 2021 02:19:27 +0000 (-0400) Subject: mgr: make mgr commands compat with pre-quincy mon X-Git-Tag: v17.1.0~1726^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=218f4cefea087eadcd8ddf47d719beda1cb6370b;p=ceph.git mgr: make mgr commands compat with pre-quincy mon If the mon is not yet quincy, do not share the quincy-ism of 'positional=false'. Signed-off-by: Sage Weil --- diff --git a/src/mgr/MgrStandby.cc b/src/mgr/MgrStandby.cc index 1ba6eaea4f61..14d95ab5158b 100644 --- a/src/mgr/MgrStandby.cc +++ b/src/mgr/MgrStandby.cc @@ -12,6 +12,7 @@ */ #include +#include #include "common/errno.h" #include "common/signal.h" @@ -258,6 +259,12 @@ void MgrStandby::send_beacon() std::vector commands = mgr_commands; std::vector py_commands = py_module_registry.get_commands(); commands.insert(commands.end(), py_commands.begin(), py_commands.end()); + if (monc.monmap.min_mon_release < ceph_release_t::quincy) { + dout(10) << " stripping out positional=false quincy-ism" << dendl; + for (auto& i : commands) { + boost::replace_all(i.cmdstring, ",positional=false", ""); + } + } m->set_command_descs(commands); dout(4) << "going active, including " << m->get_command_descs().size() << " commands in beacon" << dendl;