Skip to content

Propagate CSI node accessible topology - #3270

Open
toughlex-donatas wants to merge 1 commit into
moby:masterfrom
toughlex-donatas:patch-1
Open

Propagate CSI node accessible topology#3270
toughlex-donatas wants to merge 1 commit into
moby:masterfrom
toughlex-donatas:patch-1

Conversation

@toughlex-donatas

Copy link
Copy Markdown

Summary

Propagate accessible_topology returned by the CSI NodeGetInfo RPC into SwarmKit's NodeCSIInfo.

Add a regression test covering the conversion.

Problem

makeNodeInfo currently copies only:

  • node_id
  • max_volumes_per_node

Although both the CSI NodeGetInfoResponse and SwarmKit's NodeCSIInfo contain an accessible topology field, that topology is discarded during conversion.

As a result, Swarm nodes are registered without CSI topology information. The scheduler cannot match topology-constrained cluster volumes to nodes and reports:

no suitable node (cannot fulfill requested CSI volume mounts on 3 nodes)

Reproduction

Environment:

Docker Engine: 29.6.2
API version: 1.55

Calling NodeGetInfo directly returns the expected topology:

node ID: i-...
max volumes: 26
topology:
  topology.ebs.csi.aws.com/zone: eu-central-1a
  topology.kubernetes.io/zone: eu-central-1a
  kubernetes.io/os: linux

However, the Swarm node description omits it:

{
  "PluginName": "csi-aws-ebs:latest",
  "NodeID": "i-...",
  "MaxVolumesPerNode": 26
}

Fix

Convert the CSI topology into SwarmKit's api.Topology when processing the NodeGetInfoResponse.

The topology remains nil when the CSI plugin does not return one.

Testing

go test ./agent/csi/plugin

Signed-off-by: Donatas Lučiūnas <donatas@toughlex.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant