Skip to content

mgr/DaemonServer: Make an ok-to-upgrade error message more generic - #70357

Merged
sseshasa merged 1 commit into
ceph:mainfrom
sseshasa:wip-fix-ok-to-upgrade-min-pg-errmsg
Jul 21, 2026
Merged

sseshasa merged 1 commit into
ceph:mainfrom
sseshasa:wip-fix-ok-to-upgrade-min-pg-errmsg

Conversation

@sseshasa

@sseshasa sseshasa commented Jul 21, 2026 •

Copy link
Copy Markdown
Contributor

When no OSDs within a CRUSH bucket can be found to upgrade, the earlier error message indicated the minimum number of PGs affected if any OSD was removed from the set. For e.g.,

Error EBUSY: unsafe to upgrade osd(s) at this time (at least X PG(s) will become offline if any OSD out of the Y in CRUSH bucket 'foo' is stopped)

This was inaccurate in some cases because the number of PGs affected is determined only from the last tested OSD in the CRUSH bucket based on the sort order (i.e., OSD with least number of PGs per OSD). Based on the CRUSH rules and placement, this doesn't mean that the least number of PGs are affected if this OSD is stopped. There may be other OSDs in the set that affect a smaller number of PGs if made offline.

But with the way ok-to-upgrade logic uses the convergence factor, not all OSDs would be tested for the offline pg check. Therefore, it is not possible to accurately determine the minimum number affected PGs.

In view of the above, the error message is modified as shown below to be slightly more generic but still convey the reason:

Error EBUSY: unsafe to upgrade osd(s) at this time (one or more PG(s) will become offline if any OSD out of the Y in CRUSH bucket 'foo' is stopped)

Fixes: https://tracker.ceph.com/issues/78425
Signed-off-by: Sridhar Seshasayee [email protected]

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.

When no OSDs within a CRUSH bucket can be found to upgrade, the earlier error
message indicated the minimum number of PGs affected if any OSD was removed
from the set. For e.g.,

"Error EBUSY: unsafe to upgrade osd(s) at this time (at least X PG(s) will
become offline if any OSD out of the Y in CRUSH bucket 'foo' is stopped)"

This was inaccurate in some cases because the number of PGs affected is
determined only from the last tested OSD in the CRUSH bucket based on the sort
order (i.e., OSD with least number of PGs per OSD). Based on the CRUSH rules
and placement, this doesn't mean that the least number of PGs are affected if
this OSD is stopped. There may be other OSDs in the set that affect a smaller
number of PGs if made offline.

But with the way ok-to-upgrade logic uses the convergence factor, not all OSDs
would be tested for the offline pg check. Therefore, it is not possible to
accurately determine the minimum number affected PGs.

In view of the above, the error message is modified as shown below to be
slightly more generic but still convey the reason:

"Error EBUSY: unsafe to upgrade osd(s) at this time (one or more PG(s) will
become offline if any OSD out of the Y in CRUSH bucket 'foo' is stopped)"

Fixes: https://tracker.ceph.com/issues/78425
Signed-off-by: Sridhar Seshasayee <[email protected]>
@sseshasa
sseshasa requested a review from NitzanMordhai July 21, 2026 05:16
@sseshasa
sseshasa requested a review from a team as a code owner July 21, 2026 05:16
@sseshasa
sseshasa removed the request for review from a team July 21, 2026 05:16

@NitzanMordhai NitzanMordhai 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

@sseshasa

Copy link
Copy Markdown
Contributor Author

jenkins test windows

@sseshasa

Copy link
Copy Markdown
Contributor Author

I am merging this change without teuthology testing since this is just a tuning applied to an existing error message with no logic/functional changes. In addition to confirming that all PR checks succeed, the following excerpt from the standalone
test shown below confirms that the error message is properly formatted:

...
../qa/standalone/misc/ok-to-upgrade.sh:193: TEST_ok_to_upgrade_replicated_pool:  exp_osds_upgradable=0
.../qa/standalone/misc/ok-to-upgrade.sh:194: TEST_ok_to_upgrade_replicated_pool:  ceph osd ok-to-upgrade sockeni03 01.2.3-1234-g1234deed --format=json
Error EBUSY: unsafe to upgrade OSD(s) at this time (one or more PG(s) will become offline if any OSD out of the 10 in CRUSH bucket 'sockeni03' is stopped)
../qa/standalone/misc/ok-to-upgrade.sh:194: TEST_ok_to_upgrade_replicated_pool:  res='
{"ok_to_upgrade":false,"all_osds_upgraded":false,"osds_in_crush_bucket":[2,5,6,7,1,4,9,3,8,0],"osds_ok_to_upgrade":[],"osds_upgraded":[],"bad_no_version":[]}'

@sseshasa
sseshasa merged commit b74a7f9 into ceph:main Jul 21, 2026
15 of 19 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.

2 participants