canonical / canonical/microceph
`microceph pool set-rf` aggressively sets the default OSD pool size.
- Dominant language
- Go
- Stars
- 396
- Forks
- 74
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 7
Description
This command takes a list of pool names as arguments, and a `--size` flag which accepts an integer for the pool size.
However, behind the scenes, this command also updates the default pool size along with the specified pools. This means if you want to just change 1 pool's size, you have to call the command twice, once with the pool name in question, and then once again with no pool name and the old default pool size to reset it.
Instead, we can add a flag `--set-default` which acts as a true/false query parameter on the API itself, determining whether the user wants to set the default OSD pool size or not.
Assuming the user wants to set a pool size of 1, we should still ensure that `mon_allow_pool_size_one` is set, even when not changing the default pool size.
This will also help with this case in the test suite:
```bash
sudo microceph pool set-rf --size 1 ""
```
where an explicit empty string needs to be passed to set the default pool size without changing any pools. Instead, we can validate that if `--set-default` is given, the minimum argument length is actually 0.
Contributor guide
Research direction
Start at the microceph pool set-rf command and its API handling, then inspect the test suite case using `--size 1 ""`. Add coverage for `--set-default`, including zero pool arguments and ensuring pool size one still enables `mon_allow_pool_size_one`; done means default sizing is changed only when requested and the existing pool behavior remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100