ceph-csi/internal/rbd
Niels de Vos 7e22180125 rbd: call undoStagingTransaction() when NodeStageVolume() fails
On line 341 a `transaction` is created. This is passed to the deferred
`undoStagingTransaction()` function when an error in the
`NodeStageVolume` procedure is detected. So far, so good.

However, on line 356 a new `transaction` is returned. This new
`transaction` is not used for the defer call.

By removing the empty `transaction` that is used in the defer call, and
calling `undoStagingTransaction()` on an error of `stageTransaction()`,
the code is a little simpler, and the cleanup of the transaction should
be done correctly now.

Updates: #2610
Signed-off-by: Niels de Vos <ndevos@redhat.com>
2021-11-17 23:58:00 +00:00
..
clone.go rbd: modify copyEncryptionConfig to accept copyOnlyPassphrase arg 2021-10-05 07:46:57 +00:00
controllerserver_test.go cleanup: resolve parallel test issue 2021-07-13 11:31:39 +00:00
controllerserver.go rbd: split the parsing and deletion logic to its own functions. 2021-10-27 18:35:00 +00:00
driver.go rbd: detect krbd features in runtime and fallback to nbd 2021-11-01 08:17:36 +00:00
encryption.go rbd: modify copyEncryptionConfig to accept copyOnlyPassphrase arg 2021-10-05 07:46:57 +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: change iteration variable name in the migration test to be specific 2021-10-11 10:06:30 +00:00
migration.go rbd: split the parsing and deletion logic to its own functions. 2021-10-27 18:35:00 +00:00
mirror.go rbd: add helper function to get local state 2021-08-16 17:38:25 +00:00
nodeserver_test.go cleanup: generalize the parseBool function 2021-11-01 08:17:36 +00:00
nodeserver.go rbd: call undoStagingTransaction() when NodeStageVolume() fails 2021-11-17 23:58:00 +00:00
rbd_attach.go rbd: utilize cookie support from rbd for nbd 2021-11-04 03:20:59 +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: modify copyEncryptionConfig to accept copyOnlyPassphrase arg 2021-10-05 07:46:57 +00:00
rbd_util_test.go rbd: detect krbd features in runtime and fallback to nbd 2021-11-01 08:17:36 +00:00
rbd_util.go rbd: detect krbd features in runtime and fallback to nbd 2021-11-01 08:17:36 +00:00
replicationcontrollerserver_test.go rbd: check local image state for resyncing 2021-10-26 12:00:36 +00:00
replicationcontrollerserver.go cleanup: remove FIXME from ResyncVolume 2021-10-26 12:00:36 +00:00
snapshot.go cleanup: move log functions to new internal/util/log package 2021-08-26 09:34:05 +00:00