• Jing Xu's avatar
    Fix volume states out of sync problem after kubelet restarts · b0248170
    Jing Xu authored
    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.
    
    Details are in proposal PR #33203
    b0248170
Name
Last commit
Last update
..
aws_ebs Loading commit data...
azure_dd Loading commit data...
azure_file Loading commit data...
cephfs Loading commit data...
cinder Loading commit data...
configmap Loading commit data...
downwardapi Loading commit data...
empty_dir Loading commit data...
fc Loading commit data...
flexvolume Loading commit data...
flocker Loading commit data...
gce_pd Loading commit data...
git_repo Loading commit data...
glusterfs Loading commit data...
host_path Loading commit data...
iscsi Loading commit data...
nfs Loading commit data...
quobyte Loading commit data...
rbd Loading commit data...
secret Loading commit data...
testing Loading commit data...
util Loading commit data...
vsphere_volume Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
doc.go Loading commit data...
metrics_cached.go Loading commit data...
metrics_du.go Loading commit data...
metrics_du_test.go Loading commit data...
metrics_errors.go Loading commit data...
metrics_nil.go Loading commit data...
metrics_nil_test.go Loading commit data...
metrics_statfs.go Loading commit data...
plugins.go Loading commit data...
plugins_test.go Loading commit data...
util.go Loading commit data...
util_test.go Loading commit data...
volume.go Loading commit data...
volume_linux.go Loading commit data...
volume_unsupported.go Loading commit data...