Cleanup #46801
opencephadm bootstrap should not apply a default spec if user does not supply "--apply-spec" option
0%
Description
The current UX semantics of the "cephadm bootstrap" command lead to unwanted behavior.
Before the "--apply-spec" option was added, "cephadm bootstrap" would merely create 1 MON and 1 MGR on the node where "cephadm bootstrap" was executed.
Then we got the "--apply-spec" option added, but it was implemented in a non-intuitive way: if you provide the option and send it a valid service spec YAML file, you get what you asked for in that file. But if you don't provide the option, you unexpectedly get 5 MONs and 2 MGRs. As far as I can tell, this behavior is not documented anywhere, and there is no way to turn it off. Currently, the only way to reproduce the original behavior is to craft spec YAML that reproduces the original behavior (1 MON and 1 MGR on the local node) and send it via the "--apply-spec" option.
I see two ways of resolving this issue:
1. get rid of the "5 MONs + 2 MGRs, on random nodes" default behavior, and restore the original behavior (1 MON + 1 MGR on the local node) as default - this is what I would prefer
2. alternatively, there could be a "--no-apply-spec" option which would completely disable the "apply spec" feature.