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>
(cherry picked from commit 89b4555)
  • Loading branch information
james-munson authored and mergify[bot] committed Apr 8, 2024
1 parent fb17970 commit b160f09
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 @@ -271,17 +271,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 b160f09

Please sign in to comment.