• 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
..
async Loading commit data...
bandwidth Loading commit data...
cache Loading commit data...
cert Loading commit data...
chmod Loading commit data...
chown Loading commit data...
clock Loading commit data...
codeinspector Loading commit data...
config Loading commit data...
configz Loading commit data...
crlf Loading commit data...
dbus Loading commit data...
diff Loading commit data...
ebtables Loading commit data...
env Loading commit data...
errors Loading commit data...
exec Loading commit data...
flag Loading commit data...
flock Loading commit data...
flowcontrol Loading commit data...
flushwriter Loading commit data...
framer Loading commit data...
goroutinemap Loading commit data...
hash Loading commit data...
homedir Loading commit data...
httpstream Loading commit data...
initsystem Loading commit data...
integer Loading commit data...
interrupt Loading commit data...
intstr Loading commit data...
io Loading commit data...
iptables Loading commit data...
json Loading commit data...
jsonpath Loading commit data...
keymutex Loading commit data...
labels Loading commit data...
limitwriter Loading commit data...
logs Loading commit data...
maps Loading commit data...
metrics Loading commit data...
mount Loading commit data...
net Loading commit data...
node Loading commit data...
oom Loading commit data...
parsers Loading commit data...
pod Loading commit data...
procfs Loading commit data...
proxy Loading commit data...
rand Loading commit data...
replicaset Loading commit data...
resourcecontainer Loading commit data...
rlimit Loading commit data...
runtime Loading commit data...
selinux Loading commit data...
sets Loading commit data...
slice Loading commit data...
strategicpatch Loading commit data...
strings Loading commit data...
sysctl Loading commit data...
system Loading commit data...
term Loading commit data...
testing Loading commit data...
threading Loading commit data...
uuid Loading commit data...
validation Loading commit data...
wait Loading commit data...
workqueue Loading commit data...
wsstream Loading commit data...
yaml Loading commit data...
BUILD Loading commit data...
doc.go Loading commit data...
template.go Loading commit data...
template_test.go Loading commit data...
trace.go Loading commit data...
trie.go Loading commit data...
umask.go Loading commit data...
umask_windows.go Loading commit data...
util.go Loading commit data...
util_test.go Loading commit data...