ceph-csi/internal/rbd
Madhu Rajanna 52290333e6 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>
2021-04-19 16:30:55 +00:00
..
clone.go cleanup: release resources for rbdImages objects after use 2021-04-14 03:59:28 +00:00
controllerserver.go rbd: repair encryption config in case it is missing 2021-04-14 03:59:28 +00:00
driver.go rbd: Add ReplicationServer struct for replication operations 2021-04-05 08:53:40 +00:00
encryption.go logging: report issues in rbdImage.DEKStore API with stacks 2021-04-14 03:59:28 +00:00
errors.go rbd: correct the code comment for ErrFlattenInProgress 2020-10-20 08:59:25 +00:00
identityserver.go cleanup: address godot warnings 2020-07-21 08:36:24 +00:00
mirror.go rbd: check for peer site status 2021-04-05 08:53:40 +00:00
nodeserver_test.go cleanup: Remove support for Delete and Unmounting v1.1.0 PVC 2020-07-10 16:07:13 +00:00
nodeserver.go cleanup: refactor deeply nested if statements in internal/rbd 2021-04-07 02:31:41 +00:00
rbd_attach.go util: introduce VolumeEncryption type 2021-03-12 10:11:47 +00:00
rbd_journal.go cleanup: move copyEncryptionConfig() from CreateVolume to Exists() 2021-04-14 03:59:28 +00:00
rbd_util_test.go rbd: add exclusive-lock and journaling image features for rbd image 2021-03-24 09:48:04 +00:00
rbd_util.go rbd: modified logic to check image watchers 2021-04-19 16:30:55 +00:00
replicationcontrollerserver.go rbd: discard up+unknown state in ResyncVolume 2021-04-15 17:13:06 +05:30
snapshot.go cleanup: rename rbdSnapshot.SnapID to VolID 2021-03-15 08:10:51 +00:00