On Tue, 18 Dec 2018, Sebastian Wagner wrote: > Am 17.12.18 um 23:02 schrieb Sage Weil: > > See WIP pull request > > > > https://github.com/ceph/ceph/pull/25597 > > > > The idea is to better unify the module options and the 'ceph config ...' > > commands. Namely, [...] > > There are some rough edges, though: > > > > - The current modules have a mix of conventions for the default values. > > The MgrMap::ModuleOption makes everything a string (default value, min, > > max, etc.) to keep the encoding simple, but half of the modules define > > default values as string and case at time of use (e.g., via int(...)), > > and half use the native types (e.g., values of None or 123). This makes the > > generic code awkard. > > Someone needs to do the conversion from strings to native Python types. > Doing this conversion in a common place would have the benefit of having > a more coherent options API. It would also be a bit less error prone. > > devicehealth/self_heal is a good example. The code in master is > obviously buggy. If we do the conversion from strings to bools in the > module itself, we may end up with different implementations. Some > modules would support "1" as a truth value, others wouldn't. Totally agree. Okay, I'll work toward this! sage