nomad icon indicating copy to clipboard operation
nomad copied to clipboard

CSI: implement GetCapacity / NodeGetVolumeStatus

Open tgross opened this issue 4 years ago • 1 comments

Splitting out of https://github.com/hashicorp/nomad/issues/8212, as we're most likely going to ship the create and snapshot workflows in Nomad 1.1.0 without having shipped GetCapacity and NodeGetVolumeStatus.

From our internal design doc:

nomad volume status already exists. If the volume’s plugin allows, we can call GetCapacity and NodeGetVolumeStatus and provide the additional information in the nomad volume status :volume_id detail view. In the example below, the bolded sections are new and come from the NodeGetVolumeStats RPC. Note that the Stats section may present the units in either bytes or inodes, depending on the plugin.

$ nomad volume status test-volume0
ID                   = test-volume0
Name                 = test-volume0
External ID          = 45e10f8a-4ecd-11eb-8ed9-0242ac110002
Plugin ID            = hostpath-plugin0
Provider             = csi-hostpath
Version              = v1.2.0-0-g83590990
Schedulable          = true
Controllers Healthy  = 0
Controllers Expected = 0
Nodes Healthy        = 1
Nodes Expected       = 1
Condition            = abnormal (provider-message-goes-here)
Access Mode          = single-node-writer
Attachment Mode      = file-system
Mount Options        = <none>
Namespace            = default

Stats
Used  Available  Total
2GiB  3GiB       5GiB

Allocations
ID      Node ID Task Group  Version  Desired  Status   Created  Modified
c8640c  da5bda  cache       0        run      running  19m ago  18m ago
2ab6f5  da81da  cache       0        run      running  19m ago  18m ago

tgross avatar Apr 07 '21 19:04 tgross

Any probability this gets implemented? I am looking to monitor the health and free space of CSI volumes and having NodeGetVolumeStats work would be a good step towards that.

skoppe avatar Nov 20 '25 14:11 skoppe