Skip to content

osd: don't skip zero weight osds when building osds_weight map - #53736

Closed
trociny wants to merge 1 commit into
ceph:mainfrom
trociny:wip-48896
Closed

trociny wants to merge 1 commit into
ceph:mainfrom
trociny:wip-48896

Conversation

@trociny

@trociny trociny commented Sep 29, 2023

Copy link
Copy Markdown
Contributor

Otherwise it may trigger ceph_assert(osd_weight.count(i.first)) failure in calc_deviations when using the result.

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

Contribution Guidelines

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
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

Otherwise it may trigger ceph_assert(osd_weight.count(i.first)) failure
in calc_deviations when using the result.

Fixes: https://tracker.ceph.com/issues/48896
Signed-off-by: Mykola Golub <[email protected]>
@trociny
trociny requested a review from a team as a code owner September 29, 2023 15:45
@github-actions github-actions Bot added the core label Sep 29, 2023

@athanatos athanatos 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.

Internal property of OSDMap, should be easy to add a unit test?

@trociny trociny added the DNM label Oct 2, 2023
@trociny

trociny commented Oct 2, 2023

Copy link
Copy Markdown
Contributor Author

@athanatos Thank you for the unit test suggestion. After writing the test I discovered that my current version would make it crash when there was an osd with 0 weight due to another assertion failure [1], and now I think I was too naive with my approach.

My idea was based on the hint from the user mailing list that it had happened after reweighting an osd to 0. But trying to reproduce this in unit tests I failed. Just reweighting is not enough. The reported assertion failure seems possible only when an osd with 0 weight may still be found in up set for at least one pg (in pgs_by_osd map), and I can't see how it may happen. Trying to upmap a pg to the osd with 0 weight did not help.

I see that calc_deviations may be called twice in calc_pg_upmaps, and pgs_by_osd may be altered by try_drop_remap_* functions before calling calc_pg_upmaps the second time, so I thought that it might be there where the zero weight osd was added, but again I have failed to build a test that could confirm this theory.

[1]

ceph_assert(target > 0);

[2] https://lists.ceph.io/hyperkitty/list/[email protected]/message/VSTIUSBPJUZER7UNBI5DPTOGATV5EXRF/

@github-actions

github-actions Bot commented Jan 3, 2024

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

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