Skip to content

add generate-crush-change-mappings command - #36

Merged
baergj merged 3 commits into
digitalocean:mainfrom
neurodrone:handle-crush-change-mappings
Apr 4, 2023
Merged

baergj merged 3 commits into
digitalocean:mainfrom
neurodrone:handle-crush-change-mappings

Conversation

@neurodrone

@neurodrone neurodrone commented Mar 30, 2023 •

Copy link
Copy Markdown
Contributor

This change adds a new generate-crush-change-mappings command to pgremapper. It attempts to address use-cases that require us to perform a major change on the CRUSHmap that can potentially incur a large rebalance of PGs across OSDs or hosts (or more). Using this command, we can now generate a list of new upmap mappings that we can gradually (or completely) import to perform the rebalance in advance before actually injecting the change via CRUSHmap.

An example use-case is to change the chooseleaf of a CRUSH rule to host from osd or to rack from host. This change can potentially incur a significant amount of backfills that cannot be easily cancelled since cancelling it would violate the new spread constraint set via the change to the crush rule. Using this command, we should be able to simulate and export a new set of mappings that can be applied in advance, prior to injecting the new CRUSHmap into the OSDMap.

Changes remaining before merging PR:

  • Write tests to cover newly added functions.
  • Update README to describe the usage.

@neurodrone
neurodrone force-pushed the handle-crush-change-mappings branch 4 times, most recently from 374721f to 7a29a51 Compare March 30, 2023 19:44
Comment thread README.md Resolved
Comment thread README.md Resolved
Comment thread ceph.go Resolved
Comment thread ceph.go Resolved
@neurodrone
neurodrone force-pushed the handle-crush-change-mappings branch from 7a29a51 to 5068c74 Compare March 30, 2023 19:55
@neurodrone neurodrone changed the title add export-crush-change-mappings command add generate-crush-change-mappings command Mar 31, 2023
@baergj

baergj commented Mar 31, 2023

Copy link
Copy Markdown
Contributor

👍 Though the new test file needs a license header.

@neurodrone

Copy link
Copy Markdown
Contributor Author

Let me know if there's anything else needed here! 😄 🙏

@baergj

baergj commented Apr 4, 2023

Copy link
Copy Markdown
Contributor

Nope! I just forgot that I have to press merge - sorry for the wait!

@baergj
baergj merged commit 1aa6d3c into digitalocean:main Apr 4, 2023
@neurodrone
neurodrone deleted the handle-crush-change-mappings branch April 4, 2023 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants