Skip to content

umbrella: qa/suites: serialize mgr key rotation in rotate-keys task - #72606

Merged
batrick merged 1 commit into
ceph:umbrellafrom
yzaken:wip-81527-umbrella
Nov 10, 2026
Merged

batrick merged 1 commit into
ceph:umbrellafrom
yzaken:wip-81527-umbrella

Conversation

@yzaken

@yzaken yzaken commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Rotating both mgr keys back-to-back can leave both mgr daemons
restarting at the same time. When that race hits, both daemons may fail
cephx auth and crash-loop, leaving no active mgr and causing ceph orch
commands to hang.

Rework the task flow to rotate OSDs first, then rotate only the standby
mgr, wait until it is running, force failover, and rotate the new
standby. This serializes mgr redeploys and closes the window where both
mgrs are down.

Fixes: https://tracker.ceph.com/issues/81386
Signed-off-by: Yonatan Zaken <[email protected]>
(cherry picked from commit ec30e78)
@yzaken
yzaken requested a review from a team as a code owner October 12, 2026 19:16
@github-actions

Copy link
Copy Markdown

Thank you for your contribution. Since you are not yet a member of the Ceph organization with write permissions on ceph/ceph.git, our CI will not automatically run. Any member of the Ceph organization may label this PR ci-approved to allow Jenkins CI jobs to run.

@github-actions github-actions Bot added this to the umbrella milestone Oct 12, 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 #72606 SOURCE PR SOURCE STATUS
0c9da6a qa/suites: serialize mgr key rotation in rotate-keys task PR #72361 ec30e78 qa/suites: serialize mgr key rotation in rotate-keys task

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 0c9da6a (cherry-pick of ec30e78)

Affected File(s)

Range Diff

Click to expand
--- Original (ec30e78f)
+++ Backport (0c9da6aa)
@@ -12,3 +12,4 @@
 
 Fixes: https://tracker.ceph.com/issues/81386
 Signed-off-by: Yonatan Zaken <[email protected]>
+(cherry picked from commit ec30e78fe6eb917324a7d451e2b87cc907a2b8e3)

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

1:  ec30e78fe6e ! 1:  0c9da6aafb8 qa/suites: serialize mgr key rotation in rotate-keys task
    @@ Commit message
     
         Fixes: https://tracker.ceph.com/issues/81386
         Signed-off-by: Yonatan Zaken <[email protected]>
    +    (cherry picked from commit ec30e78fe6eb917324a7d451e2b87cc907a2b8e3)
     
      ## qa/suites/orch/cephadm/with-work/tasks/rotate-keys.yaml ##
     @@ qa/suites/orch/cephadm/with-work/tasks/rotate-keys.yaml: tasks:
    @@ qa/suites/orch/cephadm/with-work/tasks/rotate-keys.yaml: tasks:
     -          echo "rotating key for $f"
     -          K=$(ceph auth get-key $f)
     -          NK="$K"
    --          ceph auth rotate --entity=$f --key-type=aes256k
    --          ceph orch daemon redeploy $f
    +-          ceph orch daemon rotate-key $f
     -          while [ "$K" == "$NK" ]; do
     +
    ++
     +      wait_for_entity_running() {
     +        local type=$1
     +        local id=$2
    @@ qa/suites/orch/cephadm/with-work/tasks/rotate-keys.yaml: tasks:
     +            | jq -e "length > 0 and .[0].status_desc == \"running\""; do
                    sleep 5
     -              NK=$(ceph auth get-key $f)
    --          done
     +            done
     +        ' _ "$type" "$id"
     +      }
    @@ qa/suites/orch/cephadm/with-work/tasks/rotate-keys.yaml: tasks:
     +          daemon_type="$1"
     +          daemon_id="$2"
     +          old_started_timestamp="$3"
    -           
    --          if [[ "$f" == mgr* ]]; then
    --              # Waiting for active/standby MGR ($f) redeploy to fully complete
    --              ceph orch ps --refresh
    --              sleep 60
    --          fi
    ++          
     +          until
     +            current_started_timestamp=$(
     +              ceph orch ps --refresh \
    @@ qa/suites/orch/cephadm/with-work/tasks/rotate-keys.yaml: tasks:
     +          until [ "$old_key" != "$new_key" ]; do
     +            sleep 10
     +            new_key=$(ceph auth get-key "$entity")
    -+          done
    +           done
     +        ' _ "$old_key" "$entity"
     +      }
     +

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

@rkachach rkachach 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.

LGTM

@yuriw

yuriw commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-yuri13-testing-20261020.164521-umbrella.

@lee-j-sanders

Copy link
Copy Markdown
Member

@batrick batrick modified the milestones: umbrella, v21.2.1 Nov 10, 2026
@github-actions github-actions Bot removed the releng-audit-fail Release engineering: failed backport verification audit. label Nov 10, 2026
@github-actions

Copy link
Copy Markdown

✅ Audit Override Applied by @batrick.

View workflow run

@batrick
batrick merged commit 4eafb75 into ceph:umbrella Nov 10, 2026
22 of 23 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.

5 participants