• Kubernetes Submit Queue's avatar
    Merge pull request #63176 from NetApp/bug/59946 · 845a55db
    Kubernetes Submit Queue authored
    Automatic merge from submit-queue (batch tested with PRs 64844, 63176). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.
    
    Fix discovery/deletion of iscsi block devices
    
    This PR modifies the iSCSI attach/detatch codepaths in the following
    ways:
    1) After unmounting a filesystem on an iSCSI block device, always
    flush the multipath device mapper entry (if it exists) and delete
    all block devices so the kernel forgets about them.
    2) When attaching an iSCSI block device, instead of blindly
    attempting to scan for the new LUN, first determine if the target
    is already logged into, and if not, do the login first. Once every
    portal is logged into, the scan is done.
    3) Scans are now done for specific devices, instead of the whole
    bus. This avoids discovering LUNs that kubelet has no interest in.
    4) Additions to the underlying utility interfaces, with new tests
    for the new functionality.
    5) Some existing code was shifted up or down, to make the new logic
    work.
    6) A typo in an existing exec call on the attach path was fixed.
    
    Fixes #59946
    
    ```release-note
    When attaching iSCSI volumes, kubelet now scans only the specific
    LUNs being attached, and also deletes them after detaching. This avoids
    dangling references to LUNs that no longer exist, which used to be the
    cause of random I/O errors/timeouts in kernel logs, slowdowns during
    block-device related operations, and very rare cases of data corruption.
    ```
    845a55db
Name
Last commit
Last update
..
fs Loading commit data...
nestedpendingoperations Loading commit data...
operationexecutor Loading commit data...
recyclerclient Loading commit data...
types Loading commit data...
volumepathhandler Loading commit data...
BUILD Loading commit data...
OWNERS Loading commit data...
atomic_writer.go Loading commit data...
atomic_writer_test.go Loading commit data...
attach_limit.go Loading commit data...
device_util.go Loading commit data...
device_util_linux.go Loading commit data...
device_util_linux_test.go Loading commit data...
device_util_unsupported.go Loading commit data...
doc.go Loading commit data...
error.go Loading commit data...
finalizer.go Loading commit data...
io_util.go Loading commit data...
metrics.go Loading commit data...
nested_volumes.go Loading commit data...
nested_volumes_test.go Loading commit data...
resize_util.go Loading commit data...
resize_util_test.go Loading commit data...
util.go Loading commit data...
util_test.go Loading commit data...