ceph-csi/internal
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
..
cephfs cleanup: move mount functions to new pkg 2021-09-23 06:39:37 +00:00
controller cleanup: simplify checkStaticVolume function and remove unwanted vars 2021-09-07 12:51:30 +00:00
csi-common util: NodeGetVolumeStatsResponse.Usage may not contain negative values 2021-10-20 07:18:48 +00:00
journal cleanup: replace parentName to snapParentName in checkReservation 2021-09-14 05:32:54 +00:00
kms util: set defaults for Vault config before converting 2021-10-28 14:41:53 +00:00
liveness cleanup: move log functions to new internal/util/log package 2021-08-26 09:34:05 +00:00
rbd rbd: call undoStagingTransaction() when NodeStageVolume() fails 2021-11-17 23:58:00 +00:00
util cleanup: fix log level 2021-11-10 10:54:29 +00:00