Skip to content

cancel-backfill: Add exclude/include-pools options - #38

Merged
baergj merged 1 commit into
digitalocean:mainfrom
BenoitKnecht:cancel-backfill-by-pool
May 19, 2023
Merged

baergj merged 1 commit into
digitalocean:mainfrom
BenoitKnecht:cancel-backfill-by-pool

Conversation

@BenoitKnecht

Copy link
Copy Markdown
Contributor

Only cancel backfills for PGs belonging to the set of pools selected by --exclude-pools/--include-pools.

Pools can be specified by integer ID or by name.

@baergj

baergj commented May 19, 2023

Copy link
Copy Markdown
Contributor

Looks good other than the test failure! Turns out that test failure is partially our fault - #39 will fix up the test implementation and then you can add pool 2 to setupTest() once you pull those changes in.

@BenoitKnecht

Copy link
Copy Markdown
Contributor Author

I was a bit perplexed as to why TestCalcPgMappingsToUndoBackfill is failing here, as it was working fine in my environment, but I think it's because it runs osdPoolDetails() for real (as opposed to using hard-coded JSON) as part of reorderUpToMatchActing(), and I assume there's no pool ID 2 in the test environment.

I could remove PG 2.* from the tests, but then it wouldn't exercise much of the exclude/include pools code path. So is there an easy way to add a pool in the test environment?

@BenoitKnecht

Copy link
Copy Markdown
Contributor Author

@baergj Race condition with my comment. :) I'll look into #39 now...

Only cancel backfills for PGs belonging to the set of pools selected by
`--exclude-pools`/`--include-pools`.

Pools can be specified by integer ID or by name.

Signed-off-by: Benoît Knecht <[email protected]>
@BenoitKnecht
BenoitKnecht force-pushed the cancel-backfill-by-pool branch from 0ddfe99 to 9efd1e4 Compare May 19, 2023 14:19

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

Thanks for the contribution!

@baergj
baergj merged commit ad0d21d into digitalocean:main May 19, 2023
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