From 85acdfcbba00e25a90eea365b8270f7081318281 Mon Sep 17 00:00:00 2001 From: Timo Reimann Date: Sun, 19 Dec 2021 23:49:30 +0100 Subject: [PATCH] Populate published node IDs in ListVolumesResponse According to [1], this "helps the CO [container orchestrator] reconcile the actual state when the volume may have been Unpublished from the node out of band from the CO". [1] https://github.com/container-storage-interface/spec/pull/374 --- driver/controller.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/driver/controller.go b/driver/controller.go index 143242fc..c9115f5e 100644 --- a/driver/controller.go +++ b/driver/controller.go @@ -564,6 +564,9 @@ func (d *Driver) ListVolumes(ctx context.Context, req *csi.ListVolumesRequest) ( VolumeId: vol.ID, CapacityBytes: vol.SizeGigaBytes * giB, }, + Status: &csi.ListVolumesResponse_VolumeStatus{ + PublishedNodeIds: []string{vol.ID}, + }, }) } @@ -609,6 +612,7 @@ func (d *Driver) ControllerGetCapabilities(ctx context.Context, req *csi.Control csi.ControllerServiceCapability_RPC_CREATE_DELETE_SNAPSHOT, csi.ControllerServiceCapability_RPC_LIST_SNAPSHOTS, csi.ControllerServiceCapability_RPC_EXPAND_VOLUME, + csi.ControllerServiceCapability_RPC_LIST_VOLUMES_PUBLISHED_NODES, } { caps = append(caps, newCap(cap)) }