Skip to content

fix make check / API / cli / qa breakage from the cephx (CVE-2025-30156) merge - #71165

Merged
idryomov merged 7 commits into
ceph:mainfrom
djgalloway:wip-fix-main-cephx-build
Aug 19, 2026
Merged

idryomov merged 7 commits into
ceph:mainfrom
djgalloway:wip-fix-main-cephx-build

Conversation

@djgalloway

@djgalloway djgalloway commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Since the CVE-2025-30156 cephx merges landed on main today (2026-08-19 ~15:50–16:20 UTC) every PR's make check, make check (arm64) and ceph API tests fail, and the Check for missing .qa links workflow fails too. The security branch evidently never went through make check against current main: first the build breaks, and with that fixed run_tox_mgr, run-cli-tests and run-tox-qa fail (see ceph-pull-requests #191815, the first run of this PR). Seven small fixes, one commit each:

  1. mon/MonClient: delete MonConnection move assignment — 3e885ab added a ceph::mutex& monc_lock reference member to MonConnection, which makes the explicitly defaulted move assignment operator implicitly deleted. clang rejects that under -Werror:

    src/mon/MonClient.h:70:18: error: explicitly defaulted move assignment operator is implicitly deleted [-Werror,-Wdefaulted-function-deleted]
    

    (e.g. ceph-pull-requests #191812, ceph-api #123475). Nothing move-assigns a MonConnection (pending_cons/active_con only move-construct), so mark it = delete, which is what the compiler had already decided.

  2. mgr/cephadm: skip mgr/mon key rotation when no mon daemons are known — fae0d0d made _upgrade_daemons() call _rotate_mgr_mon_auth_keys() on every pass; with no mon daemons in the cache it treats "no mons need upgrade" as "all mons upgraded", sets auth_allowed_ciphers, rotates mgr keys and then crashes on mon_daemons[0] (IndexError, cephadm/upgrade.py:1795). Four cephadm/tests/test_upgrade.py tests fail deterministically in run_tox_mgr because of it (e.g. ceph-pull-requests #191815). Skip the rotation for that pass when no mons are known (nothing to rotate and no way to know the mons are upgraded); the next pass retries. Verified locally: cephadm/tests 1534 passed, flake8 clean. @adk3798 FYI — you may want tests for the rotation path itself; none of the existing ones reach it.

  3. qa/suites/rados/upgrade/cephx: add missing .qa symlinks — the new X/ and release-X/ suites are missing .qa links in ms_bind, tasks/07-client-auth-keys and tasks/08-allowed-ciphers; src/script/verify-qa now passes.

  4. common/entity_name: print type names in get_valid_types_as_str() — a real bug from 0753b1d: it streams .first (the uint8_t entity_type_t) instead of .second, so ceph-conf --name total.garbage prints valid types are: , \x01, \x04, \x02, \x10, \x08 (and src/test/cli/ceph-conf/invalid-args.t fails). One-word fix.

  5. test/cli: update cram expectations for cephx auth changes — the ten other run-cli-tests failures are stale .t expectations: ceph-authtool --help gained -t/--key-type, monmaptool gained the --auth-* options and prints auth_epoch/auth_*_cipher, and the cephx_auth_aes256k mon feature bit shows up in feature lists. Updated from the actual tool output in #191815.

  6. qa/tasks: fix flake8 findings in ceph.py and radosbench.py — run-tox-qa (flake8 --select=F,E9) fails on four unused locals in qa/tasks/ceph.py and an f'' without placeholders / unused as e in qa/tasks/radosbench.py. No functional change; verified clean locally.

  7. cephadm: black-format OSD key rotation code in daemons/ceph.py — now that cephadm/tests: pre-import tracemalloc to avoid pyfakefs setup race #71163 is in and the cephadm py3 env passes again, run-tox-cephadm still fails on check-black: the OSD key-rotation lines from c9bc85a/24dc65ef20d in cephadmlib/daemons/ceph.py aren't black-formatted (#191828). Output of tox -e format-black (black 23.12.1) on that file; no functional change.

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: [ ] becomes [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 (3e885ab, fae0d0d, 0753b1d / 9633561)
    • 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)

@djgalloway
djgalloway requested a review from a team as a code owner August 19, 2026 16:50
@github-actions github-actions Bot added the core label Aug 19, 2026
@batrick

batrick commented Aug 19, 2026

Copy link
Copy Markdown
Member

I will pull these changes into

#71161
#71162

after CI passes here. Thanks @djgalloway

@djgalloway
djgalloway requested a review from a team as a code owner August 19, 2026 17:33
@djgalloway
djgalloway force-pushed the wip-fix-main-cephx-build branch from 59afeda to 8168c40 Compare August 19, 2026 17:33
@djgalloway djgalloway changed the title main: fix build break and missing .qa links from the cephx (CVE-2025-30156) merge main: fix build break, cephadm upgrade unit tests and missing .qa links from the cephx (CVE-2025-30156) merge Aug 19, 2026
@djgalloway djgalloway changed the title main: fix build break, cephadm upgrade unit tests and missing .qa links from the cephx (CVE-2025-30156) merge main: fix make check / API / cli / qa breakage from the cephx (CVE-2025-30156) merge Aug 19, 2026

@phlogistonjohn phlogistonjohn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

.py file changes look ok to me.

@djgalloway

Copy link
Copy Markdown
Contributor Author

make check continues to fail because it needs #71163 and vice versa

@batrick

batrick commented Aug 19, 2026

Copy link
Copy Markdown
Member

make check continues to fail because it needs #71163 and vice versa

Shall I override and merge this?

3e885ab ("mon/MonClient: add assertions for monc lock in
MonConnection") added a `ceph::mutex& monc_lock` reference member to
MonConnection, which makes the explicitly defaulted move assignment
operator implicitly deleted.  clang (-Wdefaulted-function-deleted,
promoted by -Werror) rejects that, so every make check / API build on
main fails since that merge:

  src/mon/MonClient.h:70:18: error: explicitly defaulted move assignment
  operator is implicitly deleted [-Werror,-Wdefaulted-function-deleted]

Nothing move-assigns a MonConnection (pending_cons/active_con only ever
move-construct), so spell out what the compiler already decided.

Fixes: 3e885ab
Signed-off-by: David Galloway <[email protected]>
Assisted-by: Claude Fable 5 (claude-fable-5)
The cephx upgrade suites added with the CVE-2025-30156 merge are missing
the .qa links in X/ms_bind, X/tasks/07-client-auth-keys,
X/tasks/08-allowed-ciphers and the release-X counterparts, so the
"Check for missing .qa links" workflow (src/script/verify-qa) fails on
every PR based on current main.  Add the links verify-qa asks for.

Signed-off-by: David Galloway <[email protected]>
Assisted-by: Claude Fable 5 (claude-fable-5)
fae0d0d ("mgr/cephadm: rotate keyring for core ceph daemons during
upgrade") made _upgrade_daemons() call _rotate_mgr_mon_auth_keys() on
every pass.  That function indexes mon_daemons[0] unconditionally, and
with an empty mon list _detect_need_upgrade() reports no mons needing
upgrade, which is taken as "all mons upgraded" -- so it goes on to set
auth_allowed_ciphers and rotate mgr keys before crashing with

  IndexError: list index out of range
  cephadm/upgrade.py:1795

Since that merge four cephadm unit tests fail deterministically in
run_tox_mgr on every PR (test_upgrade_daemons_offline_hosts,
test_upgrade_run[False/True],
test_do_upgrade_limit_exhausted_marks_complete_without_scope_check);
they exercise the upgrade machinery without any mon daemons in the
cache.

Without any known mon daemons we cannot tell whether the mons have been
upgraded and there is no mon keyring to rotate, so skip the rotation for
this pass and let the next upgrade pass retry once the cache has mons.

Fixes: fae0d0d
Signed-off-by: David Galloway <[email protected]>
Assisted-by: Claude Fable 5 (claude-fable-5)
0753b1d ("common/entity_name: dump type name as string") turned
STR_TO_ENTITY_TYPE into a vector of (entity_type_t, std::string) pairs
but left get_valid_types_as_str() streaming .first, i.e. the uint8_t
type value, so e.g. `ceph-conf --name total.garbage` now says

  valid types are:  , \x01, \x04, \x02, \x10, \x08

instead of "auth, mon, osd, mds, mgr, client", and the
src/test/cli/ceph-conf/invalid-args.t cram test fails in run-cli-tests.
Stream the name (.second).

Fixes: 0753b1d
Signed-off-by: David Galloway <[email protected]>
Assisted-by: Claude Fable 5 (claude-fable-5)
The CVE-2025-30156 cephx merge (9633561) added a -t/--key-type
option to ceph-authtool, --auth-service-cipher/--auth-allowed-ciphers/
--auth-preferred-cipher options and auth_epoch/auth_*_cipher fields to
monmaptool, and the cephx_auth_aes256k mon feature bit, without
updating the cram expectations under src/test/cli, so run-cli-tests
fails on every PR.  Update the ten affected .t files with the output
the tools now produce.

Fixes: 9633561
Signed-off-by: David Galloway <[email protected]>
Assisted-by: Claude Fable 5 (claude-fable-5)
The cephx merge (9633561) left four unused local variables in
qa/tasks/ceph.py (key_prune/key_rotate/task) and an f-string without
placeholders plus an unused exception binding in qa/tasks/radosbench.py,
so run-tox-qa (flake8 --select=F,E9) fails on every PR.  No functional
change.

Fixes: 9633561
Signed-off-by: David Galloway <[email protected]>
Assisted-by: Claude Fable 5 (claude-fable-5)
@batrick
batrick force-pushed the wip-fix-main-cephx-build branch from 7e8ea7f to 297c44b Compare August 19, 2026 19:14
@batrick

batrick commented Aug 19, 2026

Copy link
Copy Markdown
Member

trivial rebase

The OSD keyring rotation changes from the CVE-2025-30156 cephx merge
(c9bc85a "cephadm: restart OSD systemd unit after key rotation",
24dc65e "cephadm: Add retries to OSD key rotation") added lines to
cephadmlib/daemons/ceph.py that are not formatted the way
`tox -e check-black` (black>=23,<24, -l78) expects, so run-tox-cephadm
fails on every PR now that the py3 env passes again:

  would reformat /ceph/src/cephadm/cephadmlib/daemons/ceph.py
  1 file would be reformatted, 50 files would be left unchanged.

This is the output of `tox -e format-black` (black 23.12.1) on that
file; no functional change.

Fixes: 24dc65e
Signed-off-by: David Galloway <[email protected]>
Assisted-by: Claude Fable 5 (claude-fable-5)
@cbodley

cbodley commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

https://jenkins.ceph.com/job/ceph-pull-requests-arm64/102120/

The following tests FAILED:
206 - unittest_mgr_clusterstate (SEGFAULT)

@cbodley

cbodley commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

jenkins test make check arm64

@idryomov idryomov changed the title main: fix make check / API / cli / qa breakage from the cephx (CVE-2025-30156) merge fix make check / API / cli / qa breakage from the cephx (CVE-2025-30156) merge Aug 19, 2026
@idryomov
idryomov merged commit 10dcea8 into ceph:main Aug 19, 2026
11 checks passed
@github-actions

Copy link
Copy Markdown

This is an automated message by src/script/redmine-upkeep.py.

I have resolved the following tracker ticket due to the merge of this PR:

No backports are pending for the ticket. If this is incorrect, please update the tracker
ticket and reset to Pending Backport state.

Update Log: https://github.com/ceph/ceph/actions/runs/32314526333

uw-sc added a commit to cobaltcore-dev/ceph that referenced this pull request Sep 23, 2026
Backport-Id: 01a0c326-e041-718b-bf29-f10dc5260620
Backport-PR: #15
Upstream-PRs: ceph#71165, ceph#71190
uw-sc added a commit to cobaltcore-dev/ceph that referenced this pull request Oct 14, 2026
Backport-Id: 01a12f91-ee54-7edc-80b3-610fd82571ba
Backport-PR: #26
Upstream-PRs: ceph#71165, ceph#71190
uw-sc added a commit to cobaltcore-dev/ceph that referenced this pull request Oct 14, 2026
Backport-Id: 01a0c326-e041-718b-bf29-f10dc5260620
Backport-PR: #15
Upstream-PRs: ceph#71165, ceph#71190
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants