ceph-csi/internal/rbd
Prasanna Kumar Kalever b6a88dd728 rbd: add volume healer
Problem:
-------
For rbd nbd userspace mounter backends, after a restart of the nodeplugin
all the mounts will start seeing IO errors. This is because, for rbd-nbd
backends there will be a userspace mount daemon running per volume, post
restart of the nodeplugin pod, there is no way to restore the daemons
back to life.

Solution:
--------
The volume healer is a one-time activity that is triggered at the startup
time of the rbd nodeplugin. It navigates through the list of volume
attachments on the node and acts accordingly.

For now, it is limited to nbd type storage only, but it is flexible and
can be extended in the future for other backend types as needed.

From a few feets above:
This solves a severe problem for nbd backed csi volumes. The healer while
going through the list of volume attachments on the node, if finds the
volume is in attached state and is of type nbd, then it will attempt to
fix the rbd-nbd volumes by sending a NodeStageVolume request with the
required volume attributes like secrets, device name, image attributes,
and etc.. which will finally help start the required rbd-nbd daemons in
the nodeplugin csi-rbdplugin container. This will allow reattaching the
backend images with the right nbd device, thus allowing the applications
to perform IO without any interruptions even after a nodeplugin restart.

Signed-off-by: Prasanna Kumar Kalever <prasanna.kalever@redhat.com>
2021-07-16 16:30:58 +00:00
..
clone.go rbd: set thick metadata if ThickProvision is set 2021-07-07 08:31:10 +00:00
controllerserver_test.go cleanup: resolve parallel test issue 2021-07-13 11:31:39 +00:00
controllerserver.go cleanup: resolves gofumpt issues of internal codes 2021-07-14 19:50:56 +00:00
driver.go rbd: add volume healer 2021-07-16 16:30:58 +00:00
encryption.go cleanup: resolve godot linter 2021-07-13 06:50:03 +00:00
errors.go rbd: correct the code comment for ErrFlattenInProgress 2020-10-20 08:59:25 +00:00
identityserver.go internal: reformat long lines in internal/rbd package to 120 chars 2021-06-28 14:43:49 +00:00
mirror.go cleanup: spell check getImageMirroingStatus 2021-07-14 07:32:01 +00:00
nodeserver_test.go cleanup: addresses paralleltest linter 2021-06-25 11:55:12 +00:00
nodeserver.go rbd: add volume healer 2021-07-16 16:30:58 +00:00
rbd_attach.go rbd: add volume healer 2021-07-16 16:30:58 +00:00
rbd_healer.go rbd: add volume healer 2021-07-16 16:30:58 +00:00
rbd_journal.go cleanup: resolves gofumpt issues of internal codes 2021-07-14 19:50:56 +00:00
rbd_util_test.go cleanup: addresses paralleltest linter 2021-06-25 11:55:12 +00:00
rbd_util.go rbd: update per volume metadata stash-file with devicePath 2021-07-16 16:30:58 +00:00
replicationcontrollerserver_test.go cleanup: resolve parallel test issue 2021-07-13 11:31:39 +00:00
replicationcontrollerserver.go cleanup: resolves gofumpt issues of internal codes 2021-07-14 19:50:56 +00:00
snapshot.go internal: reformat long lines in internal/rbd package to 120 chars 2021-06-28 14:43:49 +00:00