container-storage-interface / spec

Container Storage Interface (CSI) Specification.
Apache License 2.0
1.34k stars 373 forks source link

Add staging path to NodeExpand/GetStats calls #390

Closed bswartz closed 5 years ago

bswartz commented 5 years ago

Allow COs to explicitly pass the staging path to node plugins when invoking NodeGetVolumeStats and NodeExpandVolume. Previously the CO could choose to pass either the staging or publish path, but there was no way for the node plugin to easily know which path it was.

This change allows COs to pass both paths (if it wishes) or just the staging path, and in either case, the node plugin can easily figure out what it's being given. This makes its significantly easier for node plugins to implement the NodeGetVolumeStats and NodeExpandVolume RPCs, in particular it relieves the need to store some state on the node.

For backwards compatibility, the field is not required, but it should be trivially easy for any CO to populate the field, so we encourage clients to set it.

Release Note:

Added optional staging_target_path field to NodeExpandVolume()
and NodeGetVolumeStats(). CO implementers should populate this
new field if possible when calling these RPCs.
gnufied commented 5 years ago

lgtm