ceph-csi/internal/rbd
Humble Chirammal 3c9d7e3cd5 rbd: detect migration volID in DeleteVolume() and delete rbd image
This commit adds the logic to detect a passed in volumeID
is a migrated volume ID and if yes, the driver connect to the
backend cluster and clean/delete the image. The logic
only applied if its a migration volume ID. The migration volume ID
carry the information like mons, pool and image name which is
good enough for the driver to identify and connect to the backend
cluster for its operations.

migration volID format:
<mig>_mons-<monsHash>_image-<imageUID>_<poolHash>

Details on the hash values:

* MonsHash: this carry a hash value (md5sum) which will be acted as the
`clusterID` for the operations in this context.

* ImageUID: this is the unique UUID generated by kubernetes for the created
volume.

* PoolHash: this is an encoded string of pool name.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2021-10-04 16:06:31 +00:00
..
clone.go cleanup: move log functions to new internal/util/log package 2021-08-26 09:34:05 +00:00
controllerserver_test.go cleanup: resolve parallel test issue 2021-07-13 11:31:39 +00:00
controllerserver.go rbd: detect migration volID in DeleteVolume() and delete rbd image 2021-10-04 16:06:31 +00:00
driver.go util: call WriteCephConfig() in cephcsi.go 2021-09-08 16:05:27 +00:00
encryption.go cleanup: move KMS functionality into its own package 2021-08-30 16:31:40 +00:00
errors.go rbd: detect migration volID in DeleteVolume() and delete rbd image 2021-10-04 16:06:31 +00:00
identityserver.go internal: reformat long lines in internal/rbd package to 120 chars 2021-06-28 14:43:49 +00:00
migration_test.go rbd: detect migration volID in DeleteVolume() and delete rbd image 2021-10-04 16:06:31 +00:00
migration.go rbd: detect migration volID in DeleteVolume() and delete rbd image 2021-10-04 16:06:31 +00:00
mirror.go rbd: add helper function to get local state 2021-08-16 17:38:25 +00:00
nodeserver_test.go cleanup: addresses paralleltest linter 2021-06-25 11:55:12 +00:00
nodeserver.go rbd: detect migration volID in DeleteVolume() and delete rbd image 2021-10-04 16:06:31 +00:00
rbd_attach.go rbd: provide alternatives to preserve the ceph log files 2021-09-16 13:55:15 +00:00
rbd_healer.go util: NewK8sClient() should not panic on non-Kubernetes clusters 2021-09-02 11:22:14 +00:00
rbd_journal.go rbd: check for clusterid mapping in RegenerateJournal() 2021-08-31 14:30:06 +00:00
rbd_util_test.go rbd: provide alternatives to preserve the ceph log files 2021-09-16 13:55:15 +00:00
rbd_util.go rbd: detect migration volID in DeleteVolume() and delete rbd image 2021-10-04 16:06:31 +00:00
replicationcontrollerserver_test.go rbd: consider empty mirroring mode 2021-08-09 11:05:05 +00:00
replicationcontrollerserver.go rbd: Report errors when a resync maybe in progress 2021-09-15 15:59:22 +00:00
snapshot.go cleanup: move log functions to new internal/util/log package 2021-08-26 09:34:05 +00:00