]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
ceph-volume: add and delete lvm tags in a single lvchange call. 34321/head
authorJan Fajerski <jfajerski@suse.com>
Tue, 31 Mar 2020 14:07:45 +0000 (16:07 +0200)
committerJan Fajerski <jfajerski@suse.com>
Tue, 21 Apr 2020 13:52:18 +0000 (15:52 +0200)
commit20ecc309371e53fda5d6a5b6cf6de6110dbe5497
tree23575767f04ea97d2e7db432a3569d42869ae700
parent713ef3c7e762ef9a07171570426c6462d3ecf2d6
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>
src/ceph-volume/ceph_volume/api/lvm.py
src/ceph-volume/ceph_volume/tests/api/test_lvm.py