ceph-csi/internal/rbd
Niels de Vos a4b6ef4561 rbd: prevent calling rbdVolume.Destroy() after an error
It seems possible that the .Destroy() function is called on a nil
pointer. This would cause a panic in the node-plugin.

Depending on how far GenVolFromVolID() comes, the returned rbdVolume can
be connected. If an error occurs, the rbdVolume should not be connected
at all, so call the .Destroy() function in those cases too.

Fixes: #4562
Signed-off-by: Niels de Vos <ndevos@ibm.com>
2024-04-17 12:29:37 +02:00
..
driver rbd: address golangci-lint issues 2024-04-09 06:55:23 +00:00
clone.go cleanup: destroy connections after .Copy() an other one 2024-04-02 11:11:20 +00:00
controllerserver_test.go rbd: add support for rbd striping 2022-06-09 18:59:00 +00:00
controllerserver.go rbd: address golangci-lint issues 2024-04-09 06:55:23 +00:00
diskusage.go rbd: do not execute rbd sparsify when volume is in use 2023-07-11 13:48:36 +00:00
encryption_test.go rbd: add unit test for ParseEncryptionOpts 2023-06-06 22:01:26 +00:00
encryption.go rbd: address golangci-lint issues 2024-04-09 06:55:23 +00:00
errors.go rbd: do not execute rbd sparsify when volume is in use 2023-07-11 13:48:36 +00:00
globals.go cleanup: do not pass EncodingVersion to GenerateVolID() 2024-03-18 06:23:28 +00:00
identityserver.go ci: fix all linter errors found in golangci-lint 2022-06-03 12:55:54 +00:00
migration_test.go build: address gofmt warnings 2023-06-05 04:49:46 +00:00
migration.go rbd: remove redundant util.Credentials arg from flattenRbdImage() 2022-01-06 12:28:18 +00:00
mirror.go build: address gofmt warnings 2023-06-05 04:49:46 +00:00
nodeserver_test.go rbd: address golangci-lint issues 2024-04-09 06:55:23 +00:00
nodeserver.go rbd: prevent calling rbdVolume.Destroy() after an error 2024-04-17 12:29:37 +02:00
rbd_attach_test.go rbd: fix parsing mapOptions 2022-03-14 15:21:25 +00:00
rbd_attach.go rbd: address golangci-lint issues 2024-04-09 06:55:23 +00:00
rbd_healer.go rbd: address golangci-lint issues 2024-04-09 06:55:23 +00:00
rbd_journal.go rbd: address golangci-lint issues 2024-04-09 06:55:23 +00:00
rbd_util_test.go rbd: address golangci-lint issues 2024-04-09 06:55:23 +00:00
rbd_util.go rbd: prevent calling rbdVolume.Destroy() after an error 2024-04-17 12:29:37 +02:00
replication.go rbd: fix resync issue 2023-08-30 09:07:46 +00:00
snapshot.go cleanup: reformat generateVolFromSnap() to rbdSnapshot.toVolume() 2024-03-28 11:54:28 +00:00