Skip to content

tentacle: qa/suites: serialize mgr key rotation in rotate-keys task - #72607

Open
yzaken wants to merge 1 commit into
ceph:tentaclefrom
yzaken:wip-81528-tentacle
Open

yzaken wants to merge 1 commit into
ceph:tentaclefrom
yzaken:wip-81528-tentacle

Conversation

@yzaken

@yzaken yzaken commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

@yzaken
yzaken requested a review from a team as a code owner October 12, 2026 19:23
@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 tentacle 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 #72607 SOURCE PR SOURCE STATUS
15e2f92 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 15e2f92 (cherry-pick of ec30e78)

Affected File(s)

Range Diff

Click to expand
--- Original (ec30e78f)
+++ Backport (15e2f92f)
@@ -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:  15e2f92f367 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:
          mon.a:
          - |
            set -ex
    --      for f in osd.0 osd.1 osd.2 osd.3 osd.4 osd.5 osd.6 osd.7 mgr.y mgr.x
    --      do
    --          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
    --          while [ "$K" == "$NK" ]; do
    ++<<<<<<< HEAD
    +       for f in osd.0 osd.1 osd.2 osd.3 osd.4 osd.5 osd.6 osd.7 mgr.y mgr.x
    +       do
    +           echo "rotating key for $f"
    +@@ qa/suites/orch/cephadm/with-work/tasks/rotate-keys.yaml: tasks:
    +               sleep 5
    +               NK=$(ceph auth get-key $f)
    +           done
    ++=======
     +
     +      wait_for_entity_running() {
     +        local type=$1
    @@ qa/suites/orch/cephadm/with-work/tasks/rotate-keys.yaml: tasks:
     +            --daemon_id "$daemon_id" \
     +            --format json \
     +            | jq -e "length > 0 and .[0].status_desc == \"running\""; do
    -               sleep 5
    --              NK=$(ceph auth get-key $f)
    --          done
    ++              sleep 5
     +            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:
     +      for f in osd.0 osd.1 osd.2 osd.3 osd.4 osd.5 osd.6 osd.7
     +      do
     +        rotate_and_redeploy $f
    ++>>>>>>> ec30e78fe6e (qa/suites: serialize mgr key rotation in rotate-keys task)
            done
     +      
     +      # Rotate the standby mgr

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 Oct 12, 2026
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)
@yuriw

yuriw commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

This PR has been added to wip-yuri14-testing-20261021.151926-tentacle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cephadm ci-approved needs-qa releng-audit-fail Release engineering: failed backport verification audit. tests wip-yuri14-testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants