encourage users to apply YAML specs instead of using the CLI
Ceph orchestrator has two main ways to interact on the command line: The CLI and YAML specs.
Turnd out, the CLI is prone to some user errors that I frequently see.
applycommand seems to be a source of lots of confusion: When executing something like this:
ceph orch apply mon host1 ceph orch apply mon host2 ceph orch apply mon host3
which leads to only a single MON at host3.
but actually they want to run this command instead:
ceph orch apply mon "host1,host2,host3"
Looks like the semantics of apply are not obvious.
- The orch CLI is fairly complex with many parameters and many options. When taking into account that we don't own the
cephbinary, but have to share it with the rest of Ceph, we can't control the CLI to a point where using the CLI don't generate user errors. For example, I'm seeing users where the parameters are "shifted" leading to wrong service specifications.
ceph orch apply RGW myrealm myzone "host1,host2,host3"
This will generate a service like this:
service_type: rgw placement: null spec: realm: myrealm zone: myzone subcluster: host1,host2,host3
Which is just wrong.
I'd propose to encourage users to use the YAML specifications and only use
ceph orch apply -i file.yaml
And let users define YAML specifications:
service_type: mon placement: hosts: - host1 - host2 - host3
- The semantics of the placement argument is clear.
- As we're using named arguments in YAML, we'll see fewer users calling the CLI wrongly.