From 66f5352772893cf457acdf702a53ff961fb7618b Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 10 Dec 2018 06:54:15 -0600 Subject: [PATCH] mon/MonCommand: populate 'availability' field for compat The CLI will behave if this field is not included in teh JSON, but when you have a nautilus+ leader mon and a luminous or mimic peon mon they will decode this empty field and include "avail": "" in the JSON command descriptions, which the CLI does not like. Fix by encoding "cli,rest" in this field for the benefit of old mons. Fixes: http://tracker.ceph.com/issues/37583 Signed-off-by: Sage Weil --- src/mon/MonCommand.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mon/MonCommand.h b/src/mon/MonCommand.h index a66d0486150..97c49127cca 100644 --- a/src/mon/MonCommand.h +++ b/src/mon/MonCommand.h @@ -59,7 +59,7 @@ struct MonCommand { encode(helpstring, bl); encode(module, bl); encode(req_perms, bl); - std::string availability; // Removed field, for backward compat + std::string availability = "cli,rest"; // Removed field, for backward compat encode(availability, bl); } void decode_bare(bufferlist::const_iterator &bl) { -- 2.39.5