Skip to content

umbrella: mon: do not ack osd new until cephx can auth as osd.N - #71969

Merged
batrick merged 2 commits into
ceph:umbrellafrom
baum:wip-80732-umbrella
Nov 16, 2026
Merged

batrick merged 2 commits into
ceph:umbrellafrom
baum:wip-80732-umbrella

Conversation

@baum

@baum baum commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Alexander Indenbaum added 2 commits September 22, 2026 13:12
wait_for_commit used to run from PaxosService::refresh() before
_update_from_paxos(), and OSDMAP refreshes before AUTH. After 53ea121
("mon: use wait_for_commit to reply"), osd new could ack while KeyServer
still lacked osd.N. handle_auth_request() serves KeyServer on the msgr
path without mon.lock.

Complete waiters in post_refresh() instead, after every service has
run _update_from_paxos(). Replies are slightly later than refresh() but
still earlier than wait_for_finished_proposal (_active()).

Signed-off-by: Alexander Indenbaum <[email protected]>
(cherry picked from commit a2230c9)
wait_for_commit now completes in post_refresh(), so osd new's existing
OSDMonitor wait is enough: KeyServer has applied the plugged auth
incremental before the ack.

That race wedged ceph-nvmeof vstart CI: osd.2 mkfs authenticated 14ms
before auth vN applied, failed with EACCES, wrote no type file, and
vstart still started the OSD.

- standalone + cephtool: osd new then immediate auth get / mkfs
- vstart: abort if mkfs wrote no type file; drop the 49e8a07 retry
  that only hid the window

Signed-off-by: Alexander Indenbaum <[email protected]>
(cherry picked from commit 6919d34)
Conflicts:
	src/vstart.sh
- tentacle/umbrella never had the 49e8a07 mkfs retry, so drop that deletion
- keep existing tee of osd-mkfs log; add type-file check and fail mkfs on error
@baum
baum requested a review from a team as a code owner September 22, 2026 10:14
@github-actions github-actions Bot added this to the umbrella milestone Sep 22, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Ceph Release Engineering Audit Report

Commit Parity Visualizer

BACKPORT PR #71969 SOURCE PR SOURCE STATUS
a8b9a20 mon: complete wait_for_commit after all services apply PR #71248 a2230c9 mon: complete wait_for_commit after all services apply
edbda7b mon: do not ack osd new until cephx can auth as osd.N 6919d34 mon: do not ack osd new until cephx can auth as osd.N

Automated Backport Parity Review - Cherry-Pick Conflicts / Deviations

⚠️ WARNING: Cherry-pick conflicts or deviations were found that require component lead review.

A conflict or deviation was detected during the simulation of this backport. The code in this PR does not match a clean cherry-pick of the upstream commits.

This does not necessarily indicate an issue but a maintainer should review.

**Click to expand conflict summaries.**

Deviation in Backport edbda7b (cherry-pick of 6919d34)

Affected File(s)

Range Diff

Click to expand
--- Original (6919d344)
+++ Backport (edbda7bf)
@@ -13,3 +13,8 @@
   that only hid the window
 
 Signed-off-by: Alexander Indenbaum <[email protected]>
+(cherry picked from commit 6919d34459e4d722d9ba163ac38330364eb38508)
+Conflicts:
+	src/vstart.sh
+- tentacle/umbrella never had the 49e8a07 mkfs retry, so drop that deletion
+- keep existing tee of osd-mkfs log; add type-file check and fail mkfs on error

================================================================================
RANGE DIFF
================================================================================

1:  6919d34459e ! 1:  edbda7bf76d mon: do not ack osd new until cephx can auth as osd.N
    @@ Commit message
           that only hid the window
     
         Signed-off-by: Alexander Indenbaum <[email protected]>
    +    (cherry picked from commit 6919d34459e4d722d9ba163ac38330364eb38508)
    +    Conflicts:
    +            src/vstart.sh
    +    - tentacle/umbrella never had the 49e8a07 mkfs retry, so drop that deletion
    +    - keep existing tee of osd-mkfs log; add type-file check and fail mkfs on error
     
      ## qa/standalone/mon/osd-new-mkfs.sh (new) ##
     @@
    @@ src/vstart.sh: prun() {
          PATH=$CEPH_BIN:$PATH "$@"
      }
      
    --# retry <max_attempts> <delay_secs> <description> <command> [args...]
    --# Run the command until it succeeds or <max_attempts> attempts have been made
    --# (use 0 for unlimited). Returns the command's last exit status.
    --retry() {
    --    local max=$1 delay=$2 what=$3
    --    shift 3
    --    local n=0 rc=0
    --    while true; do
    --        rc=0
    --        "$@" || rc=$?
    --        if [ "$rc" -eq 0 ]; then
    --            return 0
    --        fi
    --        n=$((n + 1))
    --        if [ "$max" -ne 0 ] && [ "$n" -ge "$max" ]; then
    --            echo "$what failed after $n attempt(s) (rc=$rc)" >&2
    --            return "$rc"
    --        fi
    --        echo "$what failed (rc=$rc), retry $n in ${delay}s" >&2
    --        sleep "$delay"
    --    done
    --}
    --
     -
      if [ -n "$VSTART_DEST" ]; then
          SRC_PATH=`dirname $0`
    @@ src/vstart.sh: EOF
                  echo "{\"cephx_secret\": \"$OSD_SECRET\"}" > $CEPH_DEV_DIR/osd$osd/new.json
                  ceph_adm osd new $uuid -i $CEPH_DEV_DIR/osd$osd/new.json
                  rm $CEPH_DEV_DIR/osd$osd/new.json
    --            # ceph-osd --mkfs authenticates to the monitor as the just-created
    --            # osd.$osd entity, which the monitor can briefly reject with EACCES
    --            # right after "osd new" (handle_auth_bad_method / failed to fetch
    --            # mon config). Transient; retry past it.
    --            retry 10 2 "ceph-osd --mkfs for osd.$osd" \
    --                prun $SUDO $CEPH_BIN/$ceph_osd $extra_osd_args -i $osd $ARGS \
     +            # osd new waits until KeyServer can auth as osd.N. Abort if mkfs
    -+            # wrote no type file. Replaces the 49e8a07 retry that only hid the
    -+            # window. mkfs still talks to the mon (classic and Crimson).
    -+            prun $SUDO $CEPH_BIN/$ceph_osd $extra_osd_args -i $osd $ARGS \
    -                 --mkfs --key $OSD_SECRET --osd-uuid $uuid $extra_seastar_args \
    -                 > $CEPH_OUT_DIR/osd-mkfs.$osd.log 2>&1 || exit $?
    ++            # wrote no type file. These branches never had the 49e8a07 retry;
    ++            # keep tee for console output, fail if type is missing.
    +             prun $SUDO $CEPH_BIN/$ceph_osd $extra_osd_args -i $osd $ARGS --mkfs --key $OSD_SECRET --osd-uuid $uuid $extra_seastar_args \
    +-                2>&1 | tee $CEPH_OUT_DIR/osd-mkfs.$osd.log
    ++                2>&1 | tee $CEPH_OUT_DIR/osd-mkfs.$osd.log || exit $?
     +            if [ ! -f "$CEPH_DEV_DIR/osd$osd/type" ]; then
     +                echo "ERROR: osd.$osd mkfs did not write $CEPH_DEV_DIR/osd$osd/type" >&2
     +                exit 1

How to proceed:

  • Authors (Genuine Conflicts): If this is a genuine conflict requiring manual resolution, ensure your resolution is correct. You must explain the conflict resolution in the commit message (e.g., leave the standard Git Conflicts: block intact) and include an explanation for changes.
  • Authors (Need Help?): Reach out to the Component Lead for technical guidance on complex code conflicts.
  • Component Leads (Review): Please review the Range Diff(s) above to verify the author's manual conflict resolution is correct for this release branch. If the deviation is intentional, documented, and approved then the component lead or @ceph/ceph-release-manager can bypass this check by commenting /audit override.

Be familiar with the rules and guidelines for writing backports.


🛟 Need Help?

If you need technical help resolving these issues, please consult with the Component Lead. If you need administrative overrides, please see the #ceph-upstream-releases channel on Slack and request a review from the @ceph/ceph-release-manager.

📋 Component Lead / Release Manager

To override the audit failure, apply releng-audit-override label or comment /audit override.


⚠️ Note: Automated audit checks will be suspended on future pushes to prevent comment spam while you work.

When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.

View workflow run

@github-actions github-actions Bot added the releng-audit-fail Release engineering: failed backport verification audit. label Sep 22, 2026
@baum

baum commented Sep 22, 2026

Copy link
Copy Markdown
Contributor Author

The Backport Audit flag is expected.

6919d34 removes the 49e8a07 vstart mkfs retry and redirects mkfs output.
tentacle/umbrella never had that retry (or the retry() helper), so the pick
cannot delete it. I kept tee of osd-mkfs.$osd.log, added || exit $?, and
abort if type is missing.

Conflicts are recorded under (cherry picked from commit 6919d344…) in
that commit. PaxosService + tests applied cleanly; make check / API /
Windows are green.

@ceph/ceph-release-manager @batrick could you review the range-diff and /audit override if this looks right?

@yuriw

yuriw commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-yuri8-testing-20261102.202309-umbrella.

@github-actions github-actions Bot removed the releng-audit-fail Release engineering: failed backport verification audit. label Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026

Copy link
Copy Markdown

✅ Audit Override Applied by @batrick.

View workflow run

@batrick batrick added needs-qa releng-audit-fail Release engineering: failed backport verification audit. labels Nov 3, 2026
@github-actions github-actions Bot removed the releng-audit-fail Release engineering: failed backport verification audit. label Nov 3, 2026
@yuriw

yuriw commented Nov 11, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-yuri6-testing-20261111.163544-umbrella.

@batrick
batrick merged commit d84c6e3 into ceph:umbrella Nov 16, 2026
25 of 26 checks passed
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.

3 participants