Skip to content

osd: Fix bug when calculating min_peer_features - #68936

Merged
batrick merged 1 commit into
ceph:mainfrom
bill-scales:issue76600
May 28, 2026
Merged

batrick merged 1 commit into
ceph:mainfrom
bill-scales:issue76600

Conversation

@bill-scales

@bill-scales bill-scales commented May 15, 2026 •

Copy link
Copy Markdown
Contributor

PeeringState calculates the minimum set of features for the set of OSDs within a PG. There is a bug when the peer info has already been cached where these peers features are not included in the calculation. This can lead to the min feature set including features that not all OSDs have.

Previously this just made some asserts less aggressive than they should have been. Pull request #57740 uses min_peer_features to decide how to encode messages to other OSDs.

Midway through an upgrade this bug can cause an OSD to send the wrong version of a message to a downlevel OSD causing it to abort.

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

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.

PeeringState calculates the minimum set of features for the set
of OSDs within a PG. There is a bug when the peer info has
already been cached where these peers features are not included
in the calculation. This can lead to the min feature set
including features that not all OSDs have.

Previously this just made some asserts less aggressive than they
should have been. Pull request ceph#57740
uses min_peer_features to decide how to encode messages to other OSDs.

Midway through an upgrade this bug can cause an OSD to send
the wrong version of a message to a downlevel OSD causing
it to abort.

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

Signed-off-by: Bill Scales <[email protected]>
@bill-scales
bill-scales requested a review from a team as a code owner May 15, 2026 14:56
@github-actions github-actions Bot added the core label May 15, 2026
@bill-scales bill-scales self-assigned this May 15, 2026

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

@batrick

batrick commented May 15, 2026

Copy link
Copy Markdown
Member

I assume this fix will be a blocker for v20.2.2?

@batrick

batrick commented May 15, 2026

Copy link
Copy Markdown
Member

This PR has been added to main integration testing by pdonnell started 2026-05-13-18:38.

@batrick batrick left a comment

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.

This broke upgrades (and may have other issues, I only tested upgrades):

05-16T11:56:26.802 INFO:[email protected]:May 16 11:56:26 trial179 ceph-b6600713-511d-11f1-939d-d404e6e7d460-osd-7[67632]: 2026-05-16T11:56:26.733+0000 7f7e20033640 -1 osd.7 67 heartbeat_check: no reply from 10.20.193.114:6806 osd.0 since back 2026-05-16T11:56:01.690044+0000 front 2026-05-16T11:56:01.690061+0000 (oldest deadline 2026-05-16T11:56:25.190067+0000)
2026-05-16T11:56:27.290 INFO:[email protected]:May 16 11:56:26 trial114 ceph-b6600713-511d-11f1-939d-d404e6e7d460-alertmanager-a[111977]: time=2026-05-16T11:56:26.951Z level=ERROR source=dispatch.go:360 msg="Notify for alerts failed" component=dispatcher num_alerts=3 err="ceph-dashboard/webhook[0]: notify retry canceled after 7 attempts: Post \"<redacted>\": dial tcp 10.20.193.114:8443: connect: connection refused; ceph-dashboard/webhook[1]: notify retry canceled after 7 attempts: Post \"<redacted>\": dial tcp 10.20.193.179:8443: connect: connection refused"
2026-05-16T11:56:27.290 INFO:[email protected]:May 16 11:56:26 trial114 ceph-b6600713-511d-11f1-939d-d404e6e7d460-alertmanager-a[111977]: time=2026-05-16T11:56:26.951Z level=WARN source=notify.go:866 msg="Notify attempt failed, will retry later" component=dispatcher receiver=ceph-dashboard integration=webhook[0] aggrGroup="{}/{}:{alertname=\"CephNodeDiskspaceWarning\"}" attempts=1 err="Post \"<redacted>\": dial tcp 10.20.193.114:8443: connect: connection refused"
2026-05-16T11:56:27.290 INFO:[email protected]:May 16 11:56:26 trial114 ceph-b6600713-511d-11f1-939d-d404e6e7d460-alertmanager-a[111977]: time=2026-05-16T11:56:26.952Z level=WARN source=notify.go:866 msg="Notify attempt failed, will retry later" component=dispatcher receiver=ceph-dashboard integration=webhook[1] aggrGroup="{}/{}:{alertname=\"CephNodeDiskspaceWarning\"}" attempts=1 err="Post \"<redacted>\": dial tcp 10.20.193.179:8443: connect: connection refused"
2026-05-16T11:56:27.467 INFO:[email protected]:May 16 11:56:27 trial179 ceph-b6600713-511d-11f1-939d-d404e6e7d460-osd-5[53637]: 2026-05-16T11:56:27.216+0000 7f923fcdf640 -1 osd.5 67 heartbeat_check: no reply from 10.20.193.114:6806 osd.0 since back 2026-05-16T11:56:01.029007+0000 front 2026-05-16T11:56:01.029024+0000 (oldest deadline 2026-05-16T11:56:25.129124+0000)
2026-05-16T11:56:27.731 INFO:[email protected]:May 16 11:56:27 trial179 ceph-b6600713-511d-11f1-939d-d404e6e7d460-osd-6[60409]: 2026-05-16T11:56:27.467+0000 7fe27d983640 -1 osd.6 67 heartbeat_check: no reply from 10.20.193.114:6806 osd.0 since back 2026-05-16T11:55:59.674697+0000 front 2026-05-16T11:55:59.674746+0000 (oldest deadline 2026-05-16T11:56:23.774739+0000)
2026-05-16T11:56:28.051 INFO:[email protected]:May 16 11:56:27 trial179 ceph-b6600713-511d-11f1-939d-d404e6e7d460-osd-7[67632]: 2026-05-16T11:56:27.730+0000 7f7e20033640 -1 osd.7 67 heartbeat_check: no reply from 10.20.193.114:6806 osd.0 since back 2026-05-16T11:56:01.690044+0000 front 2026-05-16T11:56:01.690061+0000 (oldest deadline 2026-05-16T11:56:25.190067+0000)
2026-05-16T11:56:28.551 INFO:[email protected]:May 16 11:56:28 trial179 ceph-b6600713-511d-11f1-939d-d404e6e7d460-osd-5[53637]: 2026-05-16T11:56:28.217+0000 7f923fcdf640 -1 osd.5 67 heartbeat_check: no reply from 10.20.193.114:6806 osd.0 since back 2026-05-16T11:56:01.029007+0000 front 2026-05-16T11:56:01.029024+0000 (oldest deadline 2026-05-16T11:56:25.129124+0000)
2026-05-16T11:56:28.551 INFO:[email protected]:May 16 11:56:28 trial179 ceph-b6600713-511d-11f1-939d-d404e6e7d460-osd-6[60409]: 2026-05-16T11:56:28.421+0000 7fe27d983640 -1 osd.6 67 heartbeat_check: no reply from 10.20.193.114:6806 osd.0 since back 2026-05-16T11:55:59.674697+0000 front 2026-05-16T11:55:59.674746+0000 (oldest deadline 2026-05-16T11:56:23.774739+0000)
2026-05-16T11:56:29.051 INFO:[email protected]:May 16 11:56:28 trial179 ceph-b6600713-511d-11f1-939d-d404e6e7d460-osd-7[67632]: 2026-05-16T11:56:28.692+0000 7f7e20033640 -1 osd.7 67 heartbeat_check: no reply from 10.20.193.114:6806 osd.0 since back 2026-05-16T11:56:01.690044+0000 front 2026-05-16T11:56:01.690061+0000 (oldest deadline 2026-05-16T11:56:25.190067+0000)
2026-05-16T11:56:29.551 INFO:[email protected]:May 16 11:56:29 trial179 ceph-b6600713-511d-11f1-939d-d404e6e7d460-osd-5[53637]: 2026-05-16T11:56:29.225+0000 7f923fcdf640 -1 osd.5 67 heartbeat_check: no reply from 10.20.193.114:6806 osd.0 since back 2026-05-16T11:56:01.029007+0000 front 2026-05-16T11:56:01.029024+0000 (oldest deadline 2026-05-16T11:56:25.129124+0000)
2026-05-16T11:56:29.552 INFO:[email protected]:May 16 11:56:29 trial179 ceph-b6600713-511d-11f1-939d-d404e6e7d460-osd-6[60409]: 2026-05-16T11:56:29.459+0000 7fe27d983640 -1 osd.6 67 heartbeat_check: no reply from 10.20.193.114:6806 osd.0 since back 2026-05-16T11:55:59.674697+0000 front 2026-05-16T11:55:59.674746+0000 (oldest deadline 2026-05-16T11:56:23.774739+0000)
2026-05-16T11:56:29.552 INFO:[email protected]:May 16 11:56:29 trial179 ceph-b6600713-511d-11f1-939d-d404e6e7d460-osd-6[60409]: 2026-05-16T11:56:29.459+0000 7fe27d983640 -1 osd.6 67 heartbeat_check: no reply from 10.20.193.114:6814 osd.1 since back 2026-05-16T11:56:04.875188+0000 front 2026-05-16T11:56:04.875162+0000 (oldest deadline 2026-05-16T11:56:28.975182+0000)
2026-05-16T11:56:30.051 INFO:[email protected]:May 16 11:56:29 trial179 ceph-b6600713-511d-11f1-939d-d404e6e7d460-osd-7[67632]: 2026-05-16T11:56:29.672+0000 7f7e20033640 -1 osd.7 67 heartbeat_check: no reply from 10.20.193.114:6806 osd.0 since back 2026-05-16T11:56:01.690044+0000 front 2026-05-16T11:56:01.690061+0000 (oldest deadline 2026-05-16T11:56:25.190067+0000)
2026-05-16T11:56:30.552 INFO:[email protected]:May 16 11:56:30 trial179 ceph-b6600713-511d-11f1-939d-d404e6e7d460-osd-5[53637]: 2026-05-16T11:56:30.260+0000 7f923fcdf640 -1 osd.5 67 heartbeat_check: no reply from 10.20.193.114:6806 osd.0 since back 2026-05-16T11:56:01.029007+0000 front 2026-05-16T11:56:01.029024+0000 (oldest deadline 2026-05-16T11:56:25.129124+0000)
2026-05-16T11:56:30.552 INFO:[email protected]:May 16 11:56:30 trial179 ceph-b6600713-511d-11f1-939d-d404e6e7d460-osd-6[60409]: 2026-05-16T11:56:30.472+0000 7fe27d983640 -1 osd.6 67 heartbeat_check: no reply from 10.20.193.114:6806 osd.0 since back 2026-05-16T11:55:59.674697+0000 front 2026-05-16T11:55:59.674746+0000 (oldest deadline 2026-05-16T11:56:23.774739+0000)
2026-05-16T11:56:30.552 INFO:[email protected]:May 16 11:56:30 trial179 ceph-b6600713-511d-11f1-939d-d404e6e7d460-osd-6[60409]: 2026-05-16T11:56:30.472+0000 7fe27d983640 -1 osd.6 67 heartbeat_check: no reply from 10.20.193.114:6814 osd.1 since back 2026-05-16T11:56:04.875188+0000 front 2026-05-16T11:56:04.875162+0000 (oldest deadline 2026-05-16T11:56:28.975182+0000)
2026-05-16T11:56:31.052 INFO:[email protected]:May 16 11:56:30 trial179 ceph-b6600713-511d-11f1-939d-d404e6e7d460-osd-7[67632]: 2026-05-16T11:56:30.652+0000 7f7e20033640 -1 osd.7 67 heartbeat_check: no reply from 10.20.193.114:6806 osd.0 since back 2026-05-16T11:56:01.690044+0000 front 2026-05-16T11:56:01.690061+0000 (oldest deadline 2026-05-16T11:56:25.190067+0000)
2026-05-16T11:56:31.052 INFO:[email protected]:May 16 11:56:30 trial179 ceph-b6600713-511d-11f1-939d-d404e6e7d460-osd-7[67632]: 2026-05-16T11:56:30.652+0000 7f7e20033640 -1 osd.7 67 heartbeat_check: no reply from 10.20.193.114:6814 osd.1 since back 2026-05-16T11:56:06.890635+0000 front 2026-05-16T11:56:06.890642+0000 (oldest deadline 2026-05-16T11:56:29.790540+0000)
2026-05-16T11:56:31.552 INFO:[email protected]:May 16 11:56:31 trial179 ceph-b6600713-511d-11f1-939d-d404e6e7d460-osd-6[60409]: 2026-05-16T11:56:31.486+0000 7fe27d983640 -1 osd.6 67 heartbeat_check: no reply from 10.20.193.114:6806 osd.0 since back 2026-05-16T11:55:59.674697+0000 front 2026-05-16T11:55:59.674746+0000 (oldest deadline 2026-05-16T11:56:23.774739+0000)
2026-05-16T11:56:31.552 INFO:[email protected]:May 16 11:56:31 trial179 ceph-b6600713-511d-11f1-939d-d404e6e7d460-osd-6[60409]: 2026-05-16T11:56:31.486+0000 7fe27d983640 -1 osd.6 67 heartbeat_check: no reply from 10.20.193.114:6814 osd.1 since back 2026-05-16T11:56:04.875188+0000 front 2026-05-16T11:56:04.875162+0000 (oldest deadline 2026-05-16T11:56:28.975182+0000)
2026-05-16T11:56:31.552 INFO:[email protected]:May 16 11:56:31 trial179 ceph-b6600713-511d-11f1-939d-d404e6e7d460-osd-5[53637]: 2026-05-16T11:56:31.295+0000 7f923fcdf640 -1 osd.5 67 heartbeat_check: no reply from 10.20.193.114:6806 osd.0 since back 2026-05-16T11:56:01.029007+0000 front 2026-05-16T11:56:01.029024+0000 (oldest deadline 2026-05-16T11:56:25.129124+0000)

From: /teuthology/pdonnell-2026-05-15_21:39:29-upgrade-wip-pdonnell-testing-20260515.172437-main-distro-default-trial/216839/teuthology.log

See: https://tracker.ceph.com/issues/76588

@batrick

batrick commented May 16, 2026

Copy link
Copy Markdown
Member

This PR has been removed from main integration testing by pdonnell started 2026-05-13-18:38.

@bill-scales

Copy link
Copy Markdown
Contributor Author

From: /teuthology/pdonnell-2026-05-15_21:39:29-upgrade-wip-pdonnell-testing-20260515.172437-main-distro-default-trial/216839/teuthology.log

See: https://tracker.ceph.com/issues/76588

@batrick I assume you mean this set of results https://pulpito.ceph.com/pdonnell-2026-05-15_21:39:29-upgrade-wip-pdonnell-testing-20260515.172437-main-distro-default-trial/ (which includes 216839 that you reference above). These all look like failures due to the upgrade docker image not existing.

Most of the jobs failed with
ERROR: Failed command: /usr/bin/docker pull quay.ceph.io/ceph-ci/ceph:426a169634a73ce9524b010e9a9c0ac5cba520ff

In a few case it looks like cephadm notices the failure but the testcase then plows on and crashes because the upgrade didn't happen.

2026-05-16T11:55:48.094 INFO:[email protected]:May 16 11:55:47 trial114 ceph-mon[37908]: Upgrade: First pull of quay.ceph.io/ceph-ci/ceph:426a169634a73ce9524b010e9a9c0ac5cba520ff
2026-05-16T11:55:48.094 INFO:[email protected]:May 16 11:55:47 trial114 ceph-mon[37908]: from='client.? 10.20.193.114:0/703471500' entity='client.admin' cmd='[{"prefix": "osd erasure-code-profile set", "name": "teuthologyprofile", "profile": ["k=2", "
m=1", "crush-failure-domain=osd"]}]': finished
2026-05-16T11:55:48.094 INFO:[email protected]:May 16 11:55:47 trial114 ceph-mon[37908]: osdmap e59: 8 total, 8 up, 8 in
2026-05-16T11:55:48.094 INFO:[email protected]:May 16 11:55:47 trial114 ceph-mon[37908]: Upgrade: Paused due to UPGRADE_FAILED_PULL: Upgrade: failed to pull target image

Perhaps a ceph-ci problem with your build not having the container images packaged? We've been seeing the packaging step of the build pipelines being unreliable recently.

@batrick

batrick commented May 18, 2026

Copy link
Copy Markdown
Member

Yes, sorry. I think you're right. I missed the error that it failed to pull the image.

@batrick

batrick commented May 18, 2026

Copy link
Copy Markdown
Member

This PR has been added to main integration testing by pdonnell started 2026-05-13-18:38.

@bill-scales

Copy link
Copy Markdown
Contributor Author

still seeing: https://pulpito.ceph.com/pdonnell-2026-05-20_05:19:01-upgrade-wip-pdonnell-testing-20260520.004756-main-distro-default-trial/223184/

@batrick I've checked the failures for all the jobs in the run that failed with a warning that an OSD daemon is in an unknown state (223184 223134 223100 223087 223068 223037 223018 223013 223184 223134 223100 223087 223068 223037 223018 223013).

None of these jobs had any OSD crashes, in all cases the warning being logged by cephadm is due to the error inject part of the test (thashosds) deliberately killing and restarting OSDs and cephadm happening to notice that the OSD was not running (there must be some kind of thresholding and I presume that cephadm is periodically polling the status of OSDs because there were many injects where an OSD was taken offline, but only a few of these got logged as cluster warnings).

It is far from ideal that the same warning can indicate genuine bugs (such as this fix) but can also be a false positive triggered by the tests error injection. I've opened https://tracker.ceph.com/issues/76747 to track this issue and to look for ways to improve the test.

In summary I still think this fix is good and that these failures in your latest upgrade run can be ignored.

@batrick

batrick commented May 21, 2026

Copy link
Copy Markdown
Member

still seeing: https://pulpito.ceph.com/pdonnell-2026-05-20_05:19:01-upgrade-wip-pdonnell-testing-20260520.004756-main-distro-default-trial/223184/

@batrick I've checked the failures for all the jobs in the run that failed with a warning that an OSD daemon is in an unknown state (223184 223134 223100 223087 223068 223037 223018 223013 223184 223134 223100 223087 223068 223037 223018 223013).

None of these jobs had any OSD crashes, in all cases the warning being logged by cephadm is due to the error inject part of the test (thashosds) deliberately killing and restarting OSDs and cephadm happening to notice that the OSD was not running (there must be some kind of thresholding and I presume that cephadm is periodically polling the status of OSDs because there were many injects where an OSD was taken offline, but only a few of these got logged as cluster warnings).

It is far from ideal that the same warning can indicate genuine bugs (such as this fix) but can also be a false positive triggered by the tests error injection. I've opened https://tracker.ceph.com/issues/76747 to track this issue and to look for ways to improve the test.

In summary I still think this fix is good and that these failures in your latest upgrade run can be ignored.

Thanks for digging into the job logs to check and for writing the ticket. I left a comment here: https://tracker.ceph.com/issues/76747#note-1

@ljflores

Copy link
Copy Markdown
Member

Looks like this needs to also be tested for the RADOS suite. @batrick @SrinivasaBharath

@batrick

batrick commented May 26, 2026

Copy link
Copy Markdown
Member

Looks like this needs to also be tested for the RADOS suite. @batrick @SrinivasaBharath

yes, please pick it up in a new integration branch.

@batrick

batrick commented May 27, 2026

Copy link
Copy Markdown
Member

This PR has been added to main integration testing by pdonnell started 2026-05-27-03:09.

@ljflores

Copy link
Copy Markdown
Member

RADOS approved: https://tracker.ceph.com/projects/rados/wiki/MAIN#httpstrackercephcomissues76931

@batrick I see you added this to an additonal batch, but it is already considered approved from Bharath's batch.

@batrick

batrick commented May 28, 2026

Copy link
Copy Markdown
Member

@batrick
batrick merged commit 44fa2a5 into ceph:main May 28, 2026
13 of 16 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.

6 participants