Refuse renaming a pool to the name of another pool in vitastor-cli #95

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

Description

modify-pool --name did not check the new name against other pools, so
two pools could end up with the same name, and commands addressing a
pool by name then picked either of them. Fail with EEXIST, as
create-pool does. The check uses the pool list that the CAS write is
based on, so a concurrent rename or create is caught by the retry.

Tested: new tests/test_modify_pool_name.sh, fails without the fix ("Pool pool2 updated", two pools named pool1) and passes with it.

Contributor Name

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

CLA

### Description modify-pool --name did not check the new name against other pools, so two pools could end up with the same name, and commands addressing a pool by name then picked either of them. Fail with EEXIST, as create-pool does. The check uses the pool list that the CAS write is based on, so a concurrent rename or create is caught by the retry. Tested: new tests/test_modify_pool_name.sh, fails without the fix ("Pool pool2 updated", two pools named pool1) 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:42 +03:00
modify-pool --name did not check the new name against other pools, so
two pools could end up with the same name, and commands addressing a
pool by name then picked either of them. Fail with EEXIST, as
create-pool does. The check uses the pool list that the CAS write is
based on, so a concurrent rename or create is caught by the retry.
Author
Contributor

Applied to master as 8ef4e7db (test merged into test_modify_pool.sh in cd2ccf9f), closing.

Applied to master as 8ef4e7db (test merged into test_modify_pool.sh in cd2ccf9f), closing.
koolkhel closed this pull request 2026-10-25 16:17:01 +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#95
No description provided.