Skip to content

Commit fec9f70

Browse files
authored
invalid santype error during mount after upgrading Trident
1 parent a083588 commit fec9f70

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

frontend/csi/node_server.go

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3305,10 +3305,6 @@ func (p *Plugin) nodeStageSANVolume(
33053305
}
33063306

33073307
switch req.PublishContext["SANType"] {
3308-
case sa.ISCSI:
3309-
if err = p.nodeStageISCSIVolume(ctx, req, publishInfo); err != nil {
3310-
return nil, status.Error(codes.Internal, err.Error())
3311-
}
33123308
case sa.FCP:
33133309
if err = p.nodeStageFCPVolume(ctx, req, publishInfo); err != nil {
33143310
return nil, status.Error(codes.Internal, err.Error())
@@ -3318,7 +3314,9 @@ func (p *Plugin) nodeStageSANVolume(
33183314
return nil, status.Error(codes.Internal, fmt.Sprintf("failed to stage volume: %s", err.Error()))
33193315
}
33203316
default:
3321-
return nil, status.Error(codes.InvalidArgument, "invalid SANType")
3317+
if err = p.nodeStageISCSIVolume(ctx, req, publishInfo); err != nil {
3318+
return nil, status.Error(codes.Internal, err.Error())
3319+
}
33223320
}
33233321

33243322
return &csi.NodeStageVolumeResponse{}, nil

frontend/csi/node_server_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9101,7 +9101,7 @@ func TestNodeStageVolume1(t *testing.T) {
91019101
},
91029102
},
91039103
expectedResponse: nil,
9104-
expErrCode: codes.InvalidArgument,
9104+
expErrCode: codes.Internal,
91059105
setupMount: func() mount.Mount {
91069106
mockMountClient := mock_mount.NewMockMount(gomock.NewController(t))
91079107
mockMountClient.EXPECT().IsCompatible(gomock.Any(), gomock.Any()).Return(nil).AnyTimes()

0 commit comments

Comments
 (0)