• Kubernetes Submit Queue's avatar
    Merge pull request #32242 from jingxu97/bug-wrongvolume-9-2 · 6a9a93d4
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue
    
    Fix race condition in updating attached volume between master and node
    
    This PR tries to fix issue #29324. The cause of this issue is that a race
    condition happens when marking volumes as attached for node status. This
    PR tries to clean up the logic of when and where to mark volumes as
    attached/detached. Basically the workflow as follows,
    1. When volume is attached sucessfully, the volume and node info is
    added into nodesToUpdateStatusFor to mark the volume as attached to the
    node.
    2. When detach request comes in, it will check whether it is safe to
    detach now. If the check passes, remove the volume from volumesToReportAsAttached
    to indicate the volume is no longer considered as attached now.
    Afterwards, reconciler tries to update node status and trigger detach
    operation. If any of these operation fails, the volume is added back to
    the volumesToReportAsAttached list showing that it is still attached.
    
    These steps should make sure that kubelet get the right (might be
    outdated) information about which volume is attached or not. It also
    garantees that if detach operation is pending, kubelet should not
    trigger any mount operations.
    6a9a93d4
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...
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_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...