ceph-csi/internal
Madhu Rajanna 599f3fd8e4 rbd: modified logic to check image watchers
Before RBD map operation, we do check the
watchers on the RBD image. In the case of
RWO volume. cephcsi makes sure only one
client is using the RBD image. If the rbd
image is mirrored, by default mirroring
daemon will add a watcher on the image
and as we are using go-ceph a watcher will
be added as we have opened the image So
we will have two watchers on an image if
mirroring is enabled. This holds when the
rbd mirror daemon is running, In case if
the mirror daemon is not running there will
be only one watcher on the rbd image
(which is placed by go-ceph image open)
we should not block the map operation if
the mirroring daemon is not running as
its Async mirroring. This commit adds a
check to make sure no more than 2 watchers
if the image is mirrored or no more than 1
watcher if it is not mirrored image.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 52290333e6)
2021-04-20 11:54:30 +05:30
..
cephfs cleanup: correct nolint directive listing format 2021-04-09 07:24:47 +00:00
controller rbd: take lock when reconciling the PV 2021-04-07 11:46:27 +00:00
csi-common util: add nil check to default ControllerGetCapabilities() 2021-04-09 10:12:48 +00:00
journal rbd: store csi.storage.k8s.io/pvc/namespace metadata as Owner 2020-12-09 13:58:48 +00:00
liveness util: replace klog with util logger in liveness.go 2020-08-19 14:38:12 +00:00
rbd rbd: modified logic to check image watchers 2021-04-20 11:54:30 +05:30
util logging: report issues in rbdImage.DEKStore API with stacks 2021-04-14 03:59:28 +00:00