• Kubernetes Submit Queue's avatar
    Merge pull request #33616 from jingxu97/statusupdater-9-22 · d7f1484e
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue
    
    Fix volume states out of sync problem after kubelet restarts
    
    When kubelet restarts, all the information about the volumes will be
    gone from actual/desired states. When update node status with mounted
    volumes, the volume list might be empty although there are still volumes
    are mounted and in turn causing master to detach those volumes since
    they are not in the mounted volumes list. This fix is to make sure only
    update mounted volumes list after reconciler starts sync states process.
    This sync state process will scan the existing volume directories and
    reconstruct actual states if they are missing.
    
    This PR also fixes the problem during orphaned pods' directories. In
    case of the pod directory is unmounted but has not yet deleted (e.g.,
    interrupted with kubelet restarts), clean up routine will delete the
    directory so that the pod directoriy could be cleaned up (it is safe to
    delete directory since it is no longer mounted)
    
    The third issue this PR fixes is that during reconstruct volume in
    actual state, mounter could not be nil since it is required for creating
    container.VolumeMap. If it is nil, it might cause nil pointer exception
    in kubelet.
    Detailed design proposal is #33203
    d7f1484e
Name
Last commit
Last update
..
api Loading commit data...
cadvisor Loading commit data...
client Loading commit data...
cm Loading commit data...
config Loading commit data...
container Loading commit data...
custommetrics Loading commit data...
dockershim Loading commit data...
dockertools Loading commit data...
envvars Loading commit data...
events Loading commit data...
eviction Loading commit data...
images Loading commit data...
kuberuntime Loading commit data...
leaky Loading commit data...
lifecycle Loading commit data...
metrics Loading commit data...
network Loading commit data...
pleg Loading commit data...
pod Loading commit data...
prober Loading commit data...
qos Loading commit data...
remote Loading commit data...
rkt Loading commit data...
rktshim Loading commit data...
server Loading commit data...
status Loading commit data...
sysctl Loading commit data...
types Loading commit data...
util Loading commit data...
volumemanager Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
active_deadline.go Loading commit data...
active_deadline_test.go Loading commit data...
disk_manager.go Loading commit data...
disk_manager_test.go Loading commit data...
doc.go Loading commit data...
kubelet.go Loading commit data...
kubelet_cadvisor.go Loading commit data...
kubelet_cadvisor_test.go Loading commit data...
kubelet_getters.go Loading commit data...
kubelet_getters_test.go Loading commit data...
kubelet_network.go Loading commit data...
kubelet_network_test.go Loading commit data...
kubelet_node_status.go Loading commit data...
kubelet_node_status_test.go Loading commit data...
kubelet_pods.go Loading commit data...
kubelet_pods_test.go Loading commit data...
kubelet_resources.go Loading commit data...
kubelet_resources_test.go Loading commit data...
kubelet_test.go Loading commit data...
kubelet_volumes.go Loading commit data...
kubelet_volumes_test.go Loading commit data...
networks.go Loading commit data...
oom_watcher.go Loading commit data...
oom_watcher_test.go Loading commit data...
pod_container_deletor.go Loading commit data...
pod_container_deletor_test.go Loading commit data...
pod_workers.go Loading commit data...
pod_workers_test.go Loading commit data...
reason_cache.go Loading commit data...
reason_cache_test.go Loading commit data...
root_context_linux.go Loading commit data...
root_context_unsupported.go Loading commit data...
runonce.go Loading commit data...
runonce_test.go Loading commit data...
runtime.go Loading commit data...
util.go Loading commit data...
volume_host.go Loading commit data...