]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
mgr/DaemonServer: Make an ok-to-upgrade error message more generic 70390/head
authorSridhar Seshasayee <sridhar.seshasayee@ibm.com>
Mon, 20 Jul 2026 14:01:37 +0000 (19:31 +0530)
committerSridhar Seshasayee <sridhar.seshasayee@ibm.com>
Tue, 21 Jul 2026 15:24:39 +0000 (20:54 +0530)
commitaf694906fdde8f35571ed442ddb210d7f284ae56
tree0b4b9de3fc60086302b82a2e5797d8328e652133
parentbf7fde4f8e3fd15e6cfcea4d35e1bab379cc0967
mgr/DaemonServer: Make an ok-to-upgrade error message more generic

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 <sridhar.seshasayee@ibm.com>
(cherry picked from commit afd0b924e2173bce863571f17dfb7d21ab3e1cfd)
src/mgr/DaemonServer.cc