]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: add and delete lvm tags in a single lvchange call. 35453/head
authorJan Fajerski <jfajerski@suse.com>
Tue, 31 Mar 2020 14:07:45 +0000 (16:07 +0200)
committerShyukri Shyukriev <shshyukriev@suse.com>
Sat, 6 Jun 2020 10:21:35 +0000 (13:21 +0300)
commit87fb94cfe78d1881a68f015623a9a2531de82a0c
treeedca115b5593542273bc8fc804a3c04e23d91c4a
parent9f51c2543fa5dc1e5ae82928f4cd3e54c4efd012
ceph-volume: add and delete lvm tags in a single lvchange call.

Otherwise we can end up in race-y situations when a concurrent c-v calls
sees only one tag but expects all tags to be present. Say if the
ceph.type tag is present, c-v expects ceph.osd_id to be present. By
setting/deleting tags in bulk, we use lvchange (and lvms internal
locking) as a sync mechanism.

Fixes: https://tracker.ceph.com/issues/44852
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
(cherry picked from commit 20ecc309371e53fda5d6a5b6cf6de6110dbe5497)
src/ceph-volume/ceph_volume/api/lvm.py
src/ceph-volume/ceph_volume/tests/api/test_lvm.py