Skip to content

Commit

Permalink
Fix format and mount failed (#90)
Browse files Browse the repository at this point in the history
* Fix for Format and Mount failed issue

* Minor if condition change
  • Loading branch information
GunaKKIBM authored Jul 5, 2022
1 parent f9de8c3 commit 7db0ff8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/ibmcsidriver/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ package ibmcsidriver
import (
"fmt"
"os"
"path/filepath"
"runtime"
"strconv"
"strings"
Expand Down Expand Up @@ -285,7 +286,8 @@ func (csiNS *CSINodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeSt
// This operation (NodeStageVolume) MUST be idempotent.
// If the volume corresponding to the volume_id is already staged to the staging_target_path,
// and is identical to the specified volume_capability the Plugin MUST reply 0 OK.
if device == source {
target, err := filepath.EvalSymlinks(source)
if err == nil && device == target {
ctxLogger.Info("volume already staged", zap.String("volumeID", volumeID))
return &csi.NodeStageVolumeResponse{}, nil
}
Expand Down

0 comments on commit 7db0ff8

Please sign in to comment.