You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: keps/sig-storage/3756-volume-reconstruction/README.md
+31-21Lines changed: 31 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -338,35 +338,45 @@ When kubelet starts, VolumeManager starts DSWP and reconciler
338
338
339
339
However, the first thing that the reconciler does before reconciling DSW and ASW
340
340
is that it scans `/var/lib/kubelet/pods/*` and reconstructs **all** found
341
-
volumes and adds them to ASW as *uncertain*. Only information that is available
342
-
[in the Pod directory on the disk are reconstructed into ASW at this point.
343
-
* Since the volume reconstruction can be imperfect and can miss `devicePath`,
344
-
]() VolumeManager adds all reconstructed volumes to `volumesNeedDevicePath`
345
-
array, to finish their reconstruction from `node.status.volumesAttached`
346
-
later.
347
-
* All volumes that failed reconstruction are added to
348
-
`volumesFailedReconstruction` list.
341
+
volumes and adds them to ASW as *uncertainly mounted* and *uncertainly attached*.
342
+
Only information that is available in the Pod directory on the disk are
343
+
reconstructed into ASW, because kubelet may not have connection to the API
344
+
server at this point.
345
+
346
+
The volume reconstruction can be imperfect:
347
+
* It can miss `devicePath`, which may not be possible to reconstruct from the OS.
348
+
* For CSI volumes, it cannot decide if a volume is attach-able to
349
+
[put it into](https://github.com/kubernetes/kubernetes/blob/89bfdf02762727506c9801d38b202873793d1106/pkg/kubelet/volumemanager/volume_manager.go#L368),
350
+
or to [remove it from](https://github.com/kubernetes/kubernetes/blob/5134520a3bc3604d14a10900c7e07481f62d5912/pkg/kubelet/volumemanager/reconciler/reconciler_common.go#L298)
351
+
`node.status.volumesInUse`, because it cannot read CSIDriver from the API
352
+
server yet.
353
+
354
+
Kubelet puts the volumes to ASW as *uncertainly attached* and with possibly
355
+
wrong `devicePath` it got from the volume plugin. Kubelet stores list of the
356
+
reconstructed volumes in `volumesNeedUpdateFromNodeStatus` to fix both
357
+
`devicePath` and attach-ability from `node.status.volumesAttached` once it
0 commit comments