During upgrade, we may get a command (like 'pg dump') before we
pass our first post-upgrade paxos round embedding the static mgr
commands. Until then, use the static mgr commands (that's what
we're proposing anyway).
Signed-off-by: Sage Weil <sage@redhat.com>
return 0;
}
+const std::vector<MonCommand> &MgrMonitor::get_command_descs() const
+{
+ if (command_descs.empty()) {
+ // must have just upgraded; fallback to static commands
+ return mgr_commands;
+ } else {
+ return command_descs;
+ }
+}
void print_summary(Formatter *f, std::ostream *ss) const;
- const std::vector<MonCommand> &get_command_descs() const {
- return command_descs;
- }
+ const std::vector<MonCommand> &get_command_descs() const;
int load_metadata(const string& name, std::map<string, string>& m,
ostream *err);