Skip to content

Commit

Permalink
fix(csi): correct error found in test.
Browse files Browse the repository at this point in the history
Signed-off-by: James Munson <james.munson@suse.com>
  • Loading branch information
james-munson committed Apr 2, 2024
1 parent 6df0510 commit 07056aa
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions csi/node_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,17 +282,17 @@ func (ns *NodeServer) nodeStageSharedVolume(volumeID, shareEndpoint, targetPath
if err == nil {
return nil
}
// Still failed. Log with mounting node and kernel version for possible troubleshooting. Don't step on actual mount error.
kernelRelease, err1 := lhns.GetKernelRelease()
if err1 != nil {
kernelRelease = err1.Error()
}
osDistro, err2 := lhns.GetOSDistro()
if err2 != nil {
osDistro = err2.Error()
}
log.WithError(err).Warnf("Failed to mount volume %v on node %s with kernel release %s, os distro %s", volumeID, ns.nodeID, kernelRelease, osDistro)
}
// Log with mounting node and kernel version for possible troubleshooting. Don't step on actual mount error.
kernelRelease, err1 := lhns.GetKernelRelease()
if err1 != nil {
kernelRelease = err1.Error()
}
osDistro, err2 := lhns.GetOSDistro()
if err2 != nil {
osDistro = err2.Error()
}
log.WithError(err).Warnf("Failed to mount volume %v on node %s with kernel release %s, os distro %s", volumeID, ns.nodeID, kernelRelease, osDistro)
return status.Error(codes.Internal, err.Error())
}

Expand Down

0 comments on commit 07056aa

Please sign in to comment.