Skip to content

qa/tasks/workunit: tolerate a failed keyring import - #72743

Closed
aainscow wants to merge 1 commit into
ceph:mainfrom
aainscow:wip-workunit-keyring-merge
Closed

aainscow wants to merge 1 commit into
ceph:mainfrom
aainscow:wip-workunit-keyring-merge

Conversation

@aainscow

@aainscow aainscow commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Warning

This PR was generated with AI assistance (Claude Code) to aid the productivity of the PR owner. It has not been reviewed by a human yet, which is why the commits have no Signed-off-by. The fix has been shown to work as follows (more under Testing below):

The workunit task merges the client's and client.admin's keyrings into the cluster keyring with the host's ceph-authtool. In rados/thrash-old-clients that tool comes from reef, which cannot decode the aes256k client.admin key already in /etc/ceph/ceph.keyring. The first import fails with error reading file /etc/ceph/ceph.keyring, so every 1-install/reef + workloads/rbd_cls job fails before the workunit runs (https://tracker.ceph.com/issues/79948). Only the client.admin import was allowed to fail.

This PR allows either import to fail. The client then finds its own key in /etc/ceph/ceph.client.N.keyring, as it did before the merge step was added. When the host's ceph-authtool can read the keyring, both imports succeed as before, so nothing changes for other jobs.

This is a narrow fix for the merge step. It does not touch how the auth ID reaches the workunits (https://tracker.ceph.com/issues/78881), and it does not make client.admin aes. In the reef rbd_cls job below, the test ran with CEPH_ID="2" and every monitor command it sent came from client.2, using the aes key provisioned for it, not client.admin. Workunits that run as client.admin regardless of CEPH_ID still need 78881. The upgrade-clients failure reported on the tracker (ceph-authtool ... --name=mgr.x in qa/tasks/ceph.py) is a different code path and is not fixed here.

Testing: rados/thrash-old-clients 1-install/reef workloads/rbd_cls, with the reef client pinned to v18.2.8 because the current reef build has no package metadata on shaman:

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. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

🤖 Generated with Claude Code

The workunit task merges the client's and client.admin's keyrings into
the cluster keyring with the host's ceph-authtool. In
rados/thrash-old-clients that tool comes from reef, which cannot decode
the aes256k client.admin key already in /etc/ceph/ceph.keyring, so the
first import fails with "error reading file" and every reef rbd_cls job
fails before the workunit runs. Only the client.admin import was
allowed to fail.

Allow either import to fail; the client then finds its own key in
/etc/ceph/ceph.client.N.keyring, as it did before the merge was added.

Fixes: https://tracker.ceph.com/issues/79948
Assisted-by: Claude Code
@github-actions github-actions Bot added the tests label Oct 15, 2026
@aainscow

Copy link
Copy Markdown
Contributor Author

How this relates to Patrick's comment on https://tracker.ceph.com/issues/79948:

Patrick describes the general problem: workunits should run as the client the job asks for (client.0 and so on), but most run as client.admin. Fixing that needs a systematic change to how the auth ID reaches the workunits (https://tracker.ceph.com/issues/78881). This PR does not attempt that.

It fixes one step. In rados/thrash-old-clients, qa/tasks/workunit.py merges keyrings with the host's reef ceph-authtool, which cannot read the aes256k client.admin key already in /etc/ceph/ceph.keyring, so the job fails before the test starts. The code already tolerated a failed client.admin import; this PR also tolerates a failed client.N import. The client then uses its own /etc/ceph/ceph.client.N.keyring, which the cephadm task creates with the suite's client_key_type: aes. This does not make client.admin aes. When the host's ceph-authtool can read the keyring, both imports succeed as before.

Evidence (reef client pinned to v18.2.8, because the current reef build has no package metadata on shaman):

  • main without this PR fails at the client.2 import, as on the tracker;
  • with this PR both jobs pass. test_cls_rbd.sh ran with CEPH_ID="2", and every monitor command it sent came from client.2, none from client.admin.

Not fixed here:

  • workunits that run as client.admin regardless of CEPH_ID (78881);
  • the upgrade-clients failure reported on the tracker, which fails in qa/tasks/ceph.py (ceph-authtool ... --name=mgr.x);
  • the tentacle and umbrella backports listed on the tracker.

Patrick warned that changes in this area can break other suites (e.g. rbd) in non-obvious ways, so a review from someone who knows it would be valuable before this goes further.

Comment thread qa/tasks/workunit.py
)
except CommandFailedError:
log.info("could not import %s into %s",
src, tmp_keyring)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the client_keyring which contains only the key we want to use for the workunit cannot be imported, isn't that already a show-stopping bug? I don't understand how this will fix anything.

@batrick batrick removed their assignment Nov 9, 2026
@aainscow

Copy link
Copy Markdown
Contributor Author

Since #69406 (merged 2026-11-06), rados/thrash-old-clients on main no longer installs reef, so main batches from 11-07 on don't hit this. Every reef rbd_cls job on tentacle and umbrella still fails this way: reef's ceph-authtool can't decode the aes256k client.admin key in /etc/ceph/ceph.keyring. PR 72743 is closed and won't be backported.

@aainscow aainscow closed this Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants