mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-24 14:00:19 +00:00
rbd: volJournal.Connect() return wrongly pushed to caller
volJournal.Connect() got the error on err2 variable, however the return was on variable err which hold the error return of DecomposeCSIID() which is wrong. This cause the error return wrongly parsed and pushed from the caller. From now on, we are reusing the err variable to hold and revert the error of volJournal.Connect(). Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
parent
5c73f0e41b
commit
70358c8eb7
@ -186,10 +186,10 @@ func (ns *NodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVol
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
||||
j, err2 := volJournal.Connect(volOptions.Monitors, volOptions.RadosNamespace, cr)
|
||||
if err2 != nil {
|
||||
util.ErrorLog(ctx, "failed to establish cluster connection: %v", err2)
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
j, connErr := volJournal.Connect(volOptions.Monitors, volOptions.RadosNamespace, cr)
|
||||
if connErr != nil {
|
||||
util.ErrorLog(ctx, "failed to establish cluster connection: %v", connErr)
|
||||
return nil, status.Error(codes.Internal, connErr.Error())
|
||||
}
|
||||
defer j.Destroy()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user