New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
volumemanager could not process reconstructed volume‘s consistency while pvc volume delay adding to dsw while apiserver access unstabitily #103143
Comments
/sig node |
/triage accepted |
I think this is a point that can be optimized. /cc@ehashman @dchen1107 |
I will give a fix for this |
@249043822 Thanks for reporting the issue, this innerSpecName and outerSpecName are confusing and cause issues. Please ping me for review when you have a fix. Thanks! |
Please don't triage your own issues immediately, give someone else a chance to review them :( /sig storage |
@ehashman okay, I know |
What happened:
We have even encountered such case that pod continuously reports “Unable to attach or mount volumes for pod;...” when kubelet restarted. The reasons are listed in details as below:
dswp.populatorLoop
, as result of apiserver instantaneous unstablility, dswp get pvc‘s pv spec failed, then the pvc volume does not be added to dsw.kubernetes/pkg/kubelet/volumemanager/populator/desired_state_of_world_populator.go
Line 542 in b0010c2
rc.reconciliationLoopFunc() -> rc.sync()
, syncStates() lists all the volume directories locally, and recontructs the volume from local volume, if the volume isn't in dsw, it will put the recontructed volume to asw, but now the volume.OuterVolumeSpecName isn't correct.kubernetes/pkg/kubelet/volumemanager/reconciler/reconciler.go
Line 583 in b0010c2
dswp.populatorLoop
, the fail to added pvc volume is added to dsw again normallykubernetes/pkg/kubelet/volumemanager/reconciler/reconciler.go
Line 205 in b0010c2
syncPod
, it checks pod's volume attach or mount success by comparing volume.OuterVolumeSpecName and pod.spec.volumeName, but this pv'c OuterVolumeSpecName isn't correct in asw. so pod continuously reports “Unable to attach or mount volumes for pod;...”kubernetes/pkg/kubelet/volumemanager/volume_manager.go
Line 459 in b0010c2
What you expected to happen:
reconcile() could sense the reconstruct volume's dismatch to the dsw, then re-mount again to make volume cache consistency
How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
kubectl version
): 1.19.4cat /etc/os-release
):uname -a
):The text was updated successfully, but these errors were encountered: