Skip to content

Commit 767dd67

Browse files
authored
[Fix] Controllerserver multivolume fix (#216)
* Fix - we need to return the device path if the volume is attached to the linode Reason - When the ControllerPublishVolume() is called and times out while waiting for volume to attach to the node, attacher will call the func again. Sometime, the volume might be attached by the time the grpc func is re-executed. This change will check this case and return back the device path so kubelet can use it. * Remove the test skip for multiVolume Details - This should be fixed since the main issue was kubelet unable to map the volume on the node --------- Co-authored-by: Khaja Omer <komer@akamai.com>
1 parent 2f70aa1 commit 767dd67

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

internal/driver/controllerserver.go

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,17 @@ func (cs *ControllerServer) ControllerPublishVolume(ctx context.Context, req *cs
303303
}
304304
if volume.LinodeID != nil {
305305
if *volume.LinodeID == linodeID {
306-
return &csi.ControllerPublishVolumeResponse{}, nil
306+
klog.V(4).Infof("[ControllerPublishVolume] volume %d is attached on instance %d with path '%s'",
307+
volume.ID,
308+
*volume.LinodeID,
309+
volume.FilesystemPath,
310+
)
311+
pvInfo := map[string]string{
312+
devicePathKey: volume.FilesystemPath,
313+
}
314+
return &csi.ControllerPublishVolumeResponse{
315+
PublishContext: pvInfo,
316+
}, nil
307317
}
308318
return &csi.ControllerPublishVolumeResponse{}, errVolumeAttached(volumeID, linodeID)
309319
}

tests/upstream-e2e/run-tests.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@ tar xzvf ${OUT_TAR} -C ${OUT_DIR}
1414

1515
# Run k8s e2e tests for storage driver
1616
./${OUT_DIR}/kubernetes/test/bin/e2e.test `# runs kubernetes e2e tests` \
17-
-ginkgo.v `# enables verbose output` \
18-
-ginkgo.focus='External.Storage' `# onl run external storage tests` \
17+
--ginkgo.vv `# enables verbose output` \
18+
--ginkgo.focus='External.Storage' `# only run external storage tests` \
1919
--ginkgo.skip='\[Disruptive\]' `# skip disruptive tests as they need ssh access to nodes` \
2020
--ginkgo.skip='volume-expand' `# skip volume-expand as its done manually for now` \
21-
--ginkgo.skip='multiVolume' `# skip multi volume as some e2e tests were failing` \
2221
--ginkgo.skip='snapshottable' `# skip as we don't support snapshots` \
2322
--ginkgo.skip='snapshottable-stress' `# skip as we don't support snapshots` \
2423
--ginkgo.skip='\[Feature:VolumeSnapshotDataSource\]' `# skip as we don't support snapshots` \

0 commit comments

Comments
 (0)