Skip to content

Ok to stop check for osd redeploy or reconfig - #71640

Merged
rkachach merged 2 commits into
ceph:mainfrom
ShwetaBhosale1:ok-to-stop-check-for-osd-redeploy-or-reconfig
Sep 21, 2026
Merged

rkachach merged 2 commits into
ceph:mainfrom
ShwetaBhosale1:ok-to-stop-check-for-osd-redeploy-or-reconfig

Conversation

@ShwetaBhosale1

@ShwetaBhosale1 ShwetaBhosale1 commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor
  1. Older version of ceph stores the osd keyring without the caps entries. During reconfiguration, the existing keyring is compared against the incoming keyring, which contains the caps. This causes ceph to incorrectly detect a keyring change and rotate the keyring even though the underlying key is the same. To fix this, the comparison is now based on the actual key value rather than the complete keyring content.
  2. When an osd is reconfigured or redeployed due to a monmap change, the current implementation does not check ok-to-stop for that osd before performing the operation. This behavior has been fixed by adding an ok-to-stop check before the reconfiguration or redeployment.

Fixes: https://tracker.ceph.com/issues/80399

Signed-off-by: Shweta Bhosale [email protected]

Testing done - performed a staggered upgrade from tentacle to the private image

[ceph: root@ceph-node-0 /]# ceph orch upgrade start  quay.io/rh-ee-shbhosal/ceph:test1 --daemon-types mgr,mon
Initiating upgrade to quay.io/rh-ee-shbhosal/ceph:test1
[ceph: root@ceph-node-0 /]# ceph orch upgrade status                                                         
{
    "in_progress": true,
    "target_image": "quay.io/rh-ee-shbhosal/ceph@sha256:358eb4ad32da875ee363d53f5880d39dc1eb4209267000f47024b25e6c69a087",
    "services_complete": [],
    "which": "Upgrading daemons of type(s) mgr,mon",
    "progress": "0/5 daemons upgraded",
    "message": "Doing first pull of quay.io/rh-ee-shbhosal/ceph:test1 image",
    "is_paused": false
}

[ceph: root@ceph-node-0 /]# ceph orch upgrade status
There are no upgrades in progress currently.
[ceph: root@ceph-node-0 /]# ceph -s
  cluster:
    id:     6ffb6fb8-ac2c-11f1-a219-525400b2a2fc
    health: HEALTH_WARN
            Monitors are configured to allow auth using insecure key types
            Monitors are configured to allow creation of insecure key types
 
  services:
    mon: 3 daemons, quorum ceph-node-0,ceph-node-1,ceph-node-2 (age 2m) [leader: ceph-node-0]
    mgr: ceph-node-1.hmnfip(active, since 2m), standbys: ceph-node-0.owhrif
    osd: 21 osds: 21 up (since 41m), 21 in (since 43m)
 
  data:
    pools:   1 pools, 1 pgs
    objects: 2 objects, 449 KiB
    usage:   595 MiB used, 104 GiB / 105 GiB avail
    pgs:     1 active+clean
 
[ceph: root@ceph-node-0 /]# 

[ceph: root@ceph-node-0 /]# ceph orch upgrade start  quay.io/rh-ee-shbhosal/ceph:test1 --daemon-types osd,crash
Initiating upgrade to quay.io/rh-ee-shbhosal/ceph:test1
[ceph: root@ceph-node-0 /]# ceph -s
  cluster:
    id:     6ffb6fb8-ac2c-11f1-a219-525400b2a2fc
    health: HEALTH_WARN
            Monitors are configured to allow creation of insecure key types
            (muted: AUTH_INSECURE_KEYS_ALLOWED)
 
  services:
    mon: 3 daemons, quorum ceph-node-0,ceph-node-1,ceph-node-2 (age 3m) [leader: ceph-node-0]
    mgr: ceph-node-1.hmnfip(active, since 3m), standbys: ceph-node-0.owhrif
    osd: 21 osds: 21 up (since 42m), 21 in (since 44m)
         flags noautoscale
 
  data:
    pools:   1 pools, 1 pgs
    objects: 2 objects, 449 KiB
    usage:   595 MiB used, 104 GiB / 105 GiB avail
    pgs:     1 active+clean
 
  progress:
    Upgrade to quay.io/rh-ee-shbhosal/ceph:test1 (0s)
      [............................] 
 
[ceph: root@ceph-node-0 /]# date
Wed Sep  9 09:46:32 UTC 2026
[ceph: root@ceph-node-0 /]# ceph orch upgrade status
There are no upgrades in progress currently.
[ceph: root@ceph-node-0 /]# ceph -s
  cluster:
    id:     6ffb6fb8-ac2c-11f1-a219-525400b2a2fc
    health: HEALTH_WARN
            Monitors are configured to allow auth using insecure key types
            Monitors are configured to allow creation of insecure key types
 
  services:
    mon: 3 daemons, quorum ceph-node-0,ceph-node-1,ceph-node-2 (age 7m) [leader: ceph-node-0]
    mgr: ceph-node-0.owhrif(active, since 7m), standbys: ceph-node-1.hmnfip
    osd: 21 osds: 21 up (since 2m), 21 in (since 52m)
 
  data:
    pools:   1 pools, 1 pgs
    objects: 2 objects, 449 KiB
    usage:   1.0 GiB used, 104 GiB / 105 GiB avail
    pgs:     1 active+clean
 
[ceph: root@ceph-node-0 /]# ceph health details
details not valid:  details not in detail
Invalid command: unused arguments: ['details']
health [<detail:detail>] :  show cluster health
Error EINVAL: invalid command
[ceph: root@ceph-node-0 /]# ceph health detail 
HEALTH_WARN Monitors are configured to allow auth using insecure key types; Monitors are configured to allow creation of insecure key types
[WRN] AUTH_INSECURE_KEYS_ALLOWED: Monitors are configured to allow auth using insecure key types
    insecure cipher aes allowed for auth
[WRN] AUTH_INSECURE_KEYS_CREATABLE: Monitors are configured to allow creation of insecure key types
[ceph: root@ceph-node-0 /]# 
[ceph: root@ceph-node-0 /]# ceph versions
{
    "mon": {
        "ceph version 21.3.0-2953-gca28ffa3 (ca28ffa3fdd2bb702d984f0648a3bf9fa42d8836) umbrella (dev - RelWithDebInfo)": 3
    },
    "mgr": {
        "ceph version 21.3.0-2953-gca28ffa3 (ca28ffa3fdd2bb702d984f0648a3bf9fa42d8836) umbrella (dev - RelWithDebInfo)": 2
    },
    "osd": {
        "ceph version 21.3.0-2953-gca28ffa3 (ca28ffa3fdd2bb702d984f0648a3bf9fa42d8836) umbrella (dev - RelWithDebInfo)": 21
    },
    "overall": {
        "ceph version 21.3.0-2953-gca28ffa3 (ca28ffa3fdd2bb702d984f0648a3bf9fa42d8836) umbrella (dev - RelWithDebInfo)": 26
    }
}
[ceph: root@ceph-node-0 /]# 

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: [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
    • 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)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

@ShwetaBhosale1 ShwetaBhosale1 changed the title Ok to stop check for osd redeploy or reconfig [WIP] Ok to stop check for osd redeploy or reconfig Sep 9, 2026
@ShwetaBhosale1 ShwetaBhosale1 changed the title [WIP] Ok to stop check for osd redeploy or reconfig Ok to stop check for osd redeploy or reconfig Sep 9, 2026
@ShwetaBhosale1
ShwetaBhosale1 marked this pull request as ready for review September 9, 2026 09:55
@ShwetaBhosale1
ShwetaBhosale1 requested a review from a team as a code owner September 9, 2026 09:55
Comment thread src/cephadm/cephadm.py Resolved
When cephadm redeploys or reconfigures an OSD and the incoming keyring
differs from the one on disk only in capability lines (e.g. the existing
keyring was written without caps but the new one includes them), the code
was unconditionally triggering a bluestore-label keyring update via
rotate_osd_lv_keyring.
Extract the bare key value from both the on-disk and incoming keyrings
and only set update_bluestore_label_osd_keyring=True when the key bytes
themselves differ.  Keyrings that differ only in section headers or
capability lines are treated as equal for this purpose.

Fixes: https://tracker.ceph.com/issues/80399

Signed-off-by: Shweta Bhosale <[email protected]>
When _check_daemons decides an OSD needs a reconfig or
redeploy (e.g. extra ceph config changed, deps changed, or monmap
updated), then before executing an redeploy or reconfig
on an OSD, consult `osd ok-to-stop` first.  If the cluster says the OSD
is not safe to stop, skip the action and log a message at INFO level;
the serve loop will retry on the next iteration, naturally backing off
until the cluster is healthy enough to proceed.

Fixes: https://tracker.ceph.com/issues/80399

Signed-off-by: Shweta Bhosale <[email protected]>
@ShwetaBhosale1
ShwetaBhosale1 force-pushed the ok-to-stop-check-for-osd-redeploy-or-reconfig branch from 71214a6 to 18bb15c Compare September 9, 2026 11:41

@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

Comment thread src/cephadm/cephadm.py
logger.debug(
'OSD keyring key value unchanged (only caps differ); '
'skipping bluestore-label keyring update for %s',
ident.daemon_id,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Are we saving the keyring with caps anywhere else? We should not be storing the caps at all; just the key.

@ShwetaBhosale1 ShwetaBhosale1 Sep 16, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don’t see a keyring with caps for any service on main.

@rkachach

Copy link
Copy Markdown
Contributor

@rkachach
rkachach merged commit 28794f7 into ceph:main Sep 21, 2026
15 of 16 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/35595533495

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