python-common: clean-up ServiceSpec.service_id handling#35839
python-common: clean-up ServiceSpec.service_id handling#35839sebastian-philipp merged 2 commits intoceph:masterfrom
Conversation
|
PR #35838 needs to be merged before tests will pass. |
34ce420 to
ccf07a7
Compare
I'm not sure a migration would be helpful, I've seen two cases thus far:
In either case, the spec with a service_id would need to be manually removed. |
|
@jschmid1 this PR works out aok for OSD/DriveGroups? |
yes, I don't see a problem with this. We recommend using a |
do we need to migrate existing clusters that have osdspecs w/o id? |
mh.. that brings us back to the question: "where to raise validation errors?" Imo we shouldn't always automatically migrate things that have changed. In this case we should make the change, and then ask the user, in some form, to assign a |
sounds like a HEALTH_WARN to me? |
maybe even an error, as this would block any new deployment? |
sebastian-philipp
left a comment
There was a problem hiding this comment.
approve. as long as CephadmOrchestrator.__init__ can load specs that fail to validate.
after a quick test, any spec that fails to validate appears to be handled by this block : ceph/src/pybind/mgr/cephadm/inventory.py Lines 125 to 128 in 0e6004c |
This would just silently fail :/ we should really implement a error reporting mechanism. |
|
jenkins test make check |
|
still getting |
|
jenkins test make check |
agree 👍 |
|
Hm. can't test this together with #35667 |
|
do you also want to fix the documentation under https://docs.ceph.com/docs/master/mgr/orchestrator/#placement-specification ? |
ccf07a7 to
a1e8642
Compare
done |
service_id is required for iscsi, mds, nfs, osd, rgw. any other service_type (mon, mgr, etc.) should not contain a service_id Fixes: https://tracker.ceph.com/issues/46175 Signed-off-by: Michael Fritch <mfritch@suse.com>
example for deploying multiple specs via yaml was missing the service_id Fixes: https://tracker.ceph.com/issues/46377 Signed-off-by: Michael Fritch <mfritch@suse.com>
a1e8642 to
7906460
Compare
| service_id='foo' | ||
| ), | ||
| False | ||
| True |
There was a problem hiding this comment.
ok that's scary. I'm pretty sure we have existing clusters with multiple MON specs applied already:
service_type: mon
placement:
count: 5
---
service_type: mon
service_id: mon
placement:
hosts:
- host1
- host2
- host3we need to handle this case properly
ServiceSpec of type 'mon' and 'mgr' must not have a service_id
Fixes: https://tracker.ceph.com/issues/46175
Signed-off-by: Michael Fritch mfritch@suse.com
Checklist
Show available Jenkins commands
jenkins retest this pleasejenkins test classic perfjenkins test crimson perfjenkins test signedjenkins test make checkjenkins test make check arm64jenkins test submodulesjenkins test dashboardjenkins test dashboard backendjenkins test docsjenkins render docsjenkins test ceph-volume alljenkins test ceph-volume tox