Skip to content

Commit ada0422

Browse files
committed
Add clarifying comments and remove excessive logging
1 parent 590fc14 commit ada0422

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/linkcache/devices_linux.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ func newDeviceCacheForNode(period time.Duration, node *v1.Node, driverName strin
5151
}
5252

5353
// Look at the status.volumesInUse field. For each, take the last section
54-
// of the string (after the last "/") and call AddVolume for that
54+
// of the string (after the last "/") and call AddVolume for that.
55+
// The expected format of the volume name is "kubernetes.io/csi/pd.csi.storage.gke.io^<volume-id>"
5556
for _, volume := range node.Status.VolumesInUse {
5657
volumeName := string(volume)
5758
tokens := strings.Split(volumeName, "^")
@@ -63,7 +64,6 @@ func newDeviceCacheForNode(period time.Duration, node *v1.Node, driverName strin
6364
// The first token is of the form "kubernetes.io/csi/<driver-name>" or just "<driver-name>".
6465
// We should check if it contains the driver name we are interested in.
6566
if !strings.Contains(tokens[0], driverName) {
66-
klog.V(5).Infof("Skipping volume %q because it is not a %s volume.", volumeName, driverName)
6767
continue
6868
}
6969
klog.Infof("Adding volume %s to cache", string(volume))

0 commit comments

Comments
 (0)