Allow to remove level_placement with an empty modify-pool value #96

Closed
koolkhel wants to merge 1 commits from koolkhel/vitastor:cli-level-placement into master
Contributor

Description

An empty --level_placement was dropped before the merge with the old
pool config, so the old rules stayed and could not be removed at all,
and a malformed value was silently dropped the same way. Make an empty
value remove the key, which the monitor treats as no extra rules, and
refuse a value that is not =[,...] with EINVAL.

Tested: tests/test_level_placement.sh (extended), fails without the fix and passes with it.

Contributor Name

Yury Luneff (MIND Software LLC, https://mindsw.io)

CLA

### Description An empty --level_placement was dropped before the merge with the old pool config, so the old rules stayed and could not be removed at all, and a malformed value was silently dropped the same way. Make an empty value remove the key, which the monitor treats as no extra rules, and refuse a value that is not <level>=<rule>[,...] with EINVAL. Tested: tests/test_level_placement.sh (extended), fails without the fix and passes with it. ### Contributor Name Yury Luneff (MIND Software LLC, https://mindsw.io) ### CLA - [x] I accept Vitastor CLA agreement: https://git.yourcmc.ru/vitalif/vitastor/src/branch/master/CLA-en.md
koolkhel added 1 commit 2026-10-25 16:14:45 +03:00
An empty --level_placement was dropped before the merge with the old
pool config, so the old rules stayed and could not be removed at all,
and a malformed value was silently dropped the same way. Make an empty
value remove the key, which the monitor treats as no extra rules, and
refuse a value that is not <level>=<rule>[,...] with EINVAL.
Author
Contributor

Applied to master as 32421ed4, closing.

Applied to master as 32421ed4, closing.
koolkhel closed this pull request 2026-10-25 16:17:02 +03:00

Pull request closed

Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vitalif/vitastor#96
No description provided.