Skip to content

crush/CrushWrapper: Merge weights if rule contains multiple take - #47189

Merged
rzarzynski merged 1 commit into
ceph:mainfrom
pdvian:wip-crush-df
Feb 17, 2025
Merged

rzarzynski merged 1 commit into
ceph:mainfrom
pdvian:wip-crush-df

Conversation

@pdvian

@pdvian pdvian commented Jul 20, 2022 •

Copy link
Copy Markdown
Contributor

If there are multiple takes in a crush rule that place a different
number of objects we do not take that into account. This creates
a MAX AVAIL stat inconsistency for a given pool from crush rule
having multiple takes. Merge weights before normalizing the
weight map.

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

Signed-off-by: Prashant D [email protected]

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

@pdvian
pdvian requested a review from a team as a code owner July 20, 2022 14:05
@github-actions github-actions Bot added the core label Jul 20, 2022
@pdvian

pdvian commented Jul 20, 2022

Copy link
Copy Markdown
Contributor Author

TBD : [osd-pool-df.sh] -- Need to remove unnecessary ceph commands and uncomment teardown testcase dir.

@rzarzynski
rzarzynski requested a review from gregsfortytwo July 20, 2022 18:06
@kamoltat
kamoltat self-requested a review July 21, 2022 14:00
@kamoltat kamoltat added needs-quincy-backport backport required for quincy needs-pacific-backport PR needs a pacific backport labels Jul 21, 2022
Comment thread qa/standalone/mon/osd-pool-df.sh Resolved
Comment thread src/crush/CrushWrapper.cc Resolved
Comment thread src/crush/CrushWrapper.cc Resolved
@pdvian

pdvian commented Jul 22, 2022

Copy link
Copy Markdown
Contributor Author

@kamoltat Do you recommend any pg autoscaler specific test coverage for this PR? I see pg autoscaler frequently request get_rule_avail.

@kamoltat

Copy link
Copy Markdown
Member

@kamoltat Do you recommend any pg autoscaler specific test coverage for this PR? I see pg autoscaler frequently request get_rule_avail.

you're right, pybind/mgr/pg_autoscaler/module.py:_get_pool_status() calls mgr/ActivePyModules.cc: pg_map.dump_pool_stats_full() a lot and dump_pool_stats_full() calls PGMap::get_rule_avail() and that calls osdmap.crush->get_rule_weight_osd_map.

However, I think the autoscaler just uses get_rule_avail() mainly to fetch data and base its calculations on that. Therefore, I think we don't need extensive test coverage for the autoscaler.

Maybe a sanity check where we enable autoscaler for a pool and use the command: ceph osd pool autoscale-status on it and check to see if there is any crash or error as output.

@kamoltat

Copy link
Copy Markdown
Member

Other than that I think this is ready for qa.

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

Somebody who's familiar with the crush shadow trees needs to take a look at this. I'm not sure who that would be.

Reason being, this looks fine to me as far as it goes (is it really this simple a change? Wow!), but I think the reason that FIXME was left in was because there are concerns about overlapping CRUSH hierarchies. Perhaps with the advent of these stretch crush rules that's a better corner case to get wrong, though? :/

@discostur

Copy link
Copy Markdown

Hi, is there anything new on this? Really looking forward for the fix to get merged ... Thanks

@gregsfortytwo

Copy link
Copy Markdown
Member

@neha-ojha Is it too late to qualify this for reef? It's getting more reports from users and would be good to resolve.

@github-actions

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.

@github-actions github-actions Bot added the stale label Apr 27, 2023
@gregsfortytwo

Copy link
Copy Markdown
Member

@rzarzynski I guess I should tag you on queries about stuff like this now.

@github-actions github-actions Bot removed the stale label Apr 28, 2023
@github-actions

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.

@github-actions github-actions Bot added the stale label Jun 27, 2023
@discostur

Copy link
Copy Markdown

@gregsfortytwo reef is close to it's release (RC2) ... any chance we will see this getting released anytime soon?

@github-actions github-actions Bot removed the stale label Jul 11, 2023
@gregsfortytwo

Copy link
Copy Markdown
Member

Pinging @rzarzynski @neha-ojha on this again. I'll poke in #ceph-devel as well.

@rzarzynski

rzarzynski commented Jul 12, 2023 •

Copy link
Copy Markdown
Contributor

This was on the agenda of the yesterday's RADOS Team Meeting. In short:

@github-actions

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.

@github-actions github-actions Bot added the stale label Sep 10, 2023
@kamoltat kamoltat removed the stale label Sep 11, 2023
@github-actions github-actions Bot removed the stale label Dec 13, 2024
@github-actions

Copy link
Copy Markdown

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@yuriw

yuriw commented Jan 17, 2025

Copy link
Copy Markdown
Contributor

@pdvian pls rebase and it can be merged now

@SrinivasaBharath

Copy link
Copy Markdown
Contributor

jenkins test make check

If there are multiple takes in a crush rule that place a different
number of objects we do not take that into account. This creates
a MAX AVAIL stat inconsistency for a given pool from crush rule
having multiple takes. Merge weights before normalizing the
weight map.

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

Signed-off-by: Prashant D <[email protected]>
@rzarzynski

Copy link
Copy Markdown
Contributor

jenkins test make check

@rzarzynski

Copy link
Copy Markdown
Contributor

jenkins test api

@rzarzynski

Copy link
Copy Markdown
Contributor
C{++} Error in qatzip.c:1680:18

Unrelated.

@rzarzynski

Copy link
Copy Markdown
Contributor

jenkins test make check

@rzarzynski

Copy link
Copy Markdown
Contributor

jenkins test api

@rzarzynski

Copy link
Copy Markdown
Contributor

jenkins test make check

@rzarzynski

Copy link
Copy Markdown
Contributor

jenkins test api

@rzarzynski

rzarzynski commented Feb 14, 2025 •

Copy link
Copy Markdown
Contributor

Unrelated:

CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Python3 (missing: Python3_EXECUTABLE Python3_INCLUDE_DIRS
  Python3_LIBRARIES Interpreter Development Development.Module
  Development.Embed) (Required is exact version "3.10")

      Reason given by package: 
          Interpreter: Wrong version for the interpreter "/bin/python3"

@rzarzynski

Copy link
Copy Markdown
Contributor

jenkins test make check

@rzarzynski

Copy link
Copy Markdown
Contributor

jenkins test api

@rzarzynski

Copy link
Copy Markdown
Contributor
CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):

@rzarzynski

Copy link
Copy Markdown
Contributor

jenkins test make check

@rzarzynski

Copy link
Copy Markdown
Contributor

The API bot signals the same failure that the now green make check bot was. Really looks unrelated:

CMake Error at /usr/share/cmake-3.28/Modules/FindPackageHandleStandardArgs.cmake:230 (message):

@rzarzynski

Copy link
Copy Markdown
Contributor

jenkins test api

1 similar comment
@rzarzynski

Copy link
Copy Markdown
Contributor

jenkins test api

@rzarzynski

Copy link
Copy Markdown
Contributor

jenkins test make check arm64

Comment thread src/crush/CrushWrapper.cc Outdated

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.

Much clearer, thanks for the change LGTM

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.

10 participants