From: Sage Weil Date: Mon, 10 Dec 2018 12:54:15 +0000 (-0600) Subject: mon/MonCommand: populate 'availability' field for compat X-Git-Tag: v14.1.0~588^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=66f5352772893cf457acdf702a53ff961fb7618b;p=ceph.git 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 --- 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) {