New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mgr/cephadm: fix rgw spec migration with simple specs #52301
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
1 failure, 3 dead jobs
Nothing to block merging |
jenkins retest this please |
jenkins test api |
1 similar comment
jenkins test api |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
from api tests failure
doesn't look related to this PR imo |
jenkins test api |
The rgw spec migration code, intended to formalize the rgw_frontend_type spec option, doesn't work with simple specs i.e. service_type: rgw service_id: rgw.1 service_name: rgw.rgw.1 placement: label: rgw because the migration code assumes there will always be a "spec" section inside the spec. This is the case for more involved rgw specs such as service_type: rgw service_id: foo placement: label: rgw count_per_host: 2 spec: rgw_realm: myrealm rgw_zone: myzone rgw_frontend_type: "beast" rgw_frontend_port: 5000 which is what the migration is actually concerned about (verification of the rgw_frontend_type in these specs). In the case where the spec is more simple, we should just leave the spec alone and move on. Unfortunately the current code assumes the field will always be there and hits an unhandled KeyError when trying to migrate the more simple specs. This causes the cephadm module to crash shortly after starting an upgrade to a version that includes this migration and it's very difficult to find the root cause. This can be worked around by adding fields to the rgw spec before upgrade so the "spec" field exists in the spec and the migration works as intended. This commit fixes the migration in the simple case as well as adding testing for that case to both the unit tests and orch/cephadm teuthology upgrade tests Fixes: https://tracker.ceph.com/issues/61889 Signed-off-by: Adam King <adking@redhat.com>
42e4a03
to
1860ef8
Compare
rebased to see if that would help the failures somehow |
jenkins test api |
1 similar comment
jenkins test api |
jenkins test api |
The rgw spec migration code, intended to formalize the rgw_frontend_type spec option, doesn't work with simple specs i.e.
because the migration code assumes there will always be a "spec" section inside the spec. This is the case for more involved rgw specs such as
which is what the migration is actually concerned about (verification of the rgw_frontend_type in these specs).
In the case where the spec is more simple, we should
just leave the spec alone and move on. Unfortunately
the current code assumes the field will always be
there and hits an unhandled KeyError when trying to
migrate the more simple specs. This causes the
cephadm module to crash shortly after starting an
upgrade to a version that includes this migration
and it's very difficult to find the root cause. This
can be worked around by adding fields to the rgw
spec before upgrade so the "spec" field exists in
the spec and the migration works as intended.
This commit fixes the migration in the simple
case as well as adding testing for that case to
both the unit tests and orch/cephadm teuthology
upgrade tests
Fixes: https://tracker.ceph.com/issues/61889
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "pacific"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
Checklist
Show available Jenkins commands
jenkins retest this please
jenkins test classic perf
jenkins test crimson perf
jenkins test signed
jenkins test make check
jenkins test make check arm64
jenkins test submodules
jenkins test dashboard
jenkins test dashboard cephadm
jenkins test api
jenkins test docs
jenkins render docs
jenkins test ceph-volume all
jenkins test ceph-volume tox
jenkins test windows