Repository navigation
umbrella: mon: do not ack osd new until cephx can auth as osd.N - #71969
Conversation
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
There was a problem hiding this comment.
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
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)
src/vstart.sh
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 1How 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.
When you are ready for a new audit, please remove the releng-audit-fail label or comment /audit retest.
|
The Backport Audit flag is expected. 6919d34 removes the 49e8a07 vstart mkfs retry and redirects mkfs output. Conflicts are recorded under @ceph/ceph-release-manager @batrick could you review the range-diff and |
|
This PR has been added to wip-yuri8-testing-20261102.202309-umbrella. |
|
✅ Audit Override Applied by @batrick. |
|
This PR has been added to wip-yuri6-testing-20261111.163544-umbrella. |
backport tracker: https://tracker.ceph.com/issues/80732
backport of #71248
parent tracker: https://tracker.ceph.com/issues/80728
this backport was staged using ceph-backport.sh version 16.0.0.6848
find the latest version at https://github.com/ceph/ceph/blob/main/src/script/ceph-backport.sh