k3s/pkg/volume
Kubernetes Submit Queue 845a55dbbd
Merge pull request #63176 from NetApp/bug/59946
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.
```
2018-07-25 16:19:01 -07:00
..
aws_ebs Avoid overflowing int64 in RoundUpSize and return error if overflow int 2018-07-23 13:48:45 -04:00
azure_dd Avoid overflowing int64 in RoundUpSize and return error if overflow int 2018-07-23 13:48:45 -04:00
azure_file Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
cephfs Add UT Test to cephfs 2018-07-25 10:40:16 +08:00
cinder Avoid overflowing int64 in RoundUpSize and return error if overflow int 2018-07-23 13:48:45 -04:00
configmap Remove unused io util writer & volume host GetWriter() 2018-07-09 14:09:48 -07:00
csi Use glog instead of fmt 2018-07-24 09:46:56 +08:00
downwardapi Stop sorting downward api file lines 2018-07-09 15:44:03 -04:00
empty_dir Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
fc kubernetes: fix printf format errors 2018-07-11 00:10:15 +03:00
flexvolume Implement fixes for flexvolume when kubelet is contanerized 2018-07-03 14:04:52 -04:00
flocker Avoid overflowing int64 in RoundUpSize and return error if overflow int 2018-07-23 13:48:45 -04:00
gce_pd Reverting commit #56600 as GCE PD is allocated in chunks of GiB instead of GBs 2018-07-16 11:55:57 -07:00
git_repo Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
glusterfs Remove `auto_unmount` mount option from pv spec annotation to setup() func. 2018-07-25 22:27:40 +05:30
host_path fixformat 2018-07-14 10:34:21 +08:00
iscsi Avoid deleted iSCSI LUNs in the kernel 2018-07-24 23:58:19 -04:00
local Merge pull request #65310 from wenlxie/upstream.master.fixlocalvolumevmnotfound 2018-06-29 20:14:12 -07:00
nfs Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
photon_pd Avoid overflowing int64 in RoundUpSize and return error if overflow int 2018-07-23 13:48:45 -04:00
portworx kubernetes: fix printf format errors 2018-07-11 00:10:15 +03:00
projected Merge pull request #65429 from WanLinghao/projected_error_return_fix 2018-07-16 13:52:54 -07:00
quobyte Merge pull request #66202 from tanshanshan/fixformat 2018-07-24 21:24:30 -07:00
rbd Merge pull request #66202 from tanshanshan/fixformat 2018-07-24 21:24:30 -07:00
scaleio Check presence of sioDiskIDPath before reading it 2018-07-17 09:55:46 -07:00
secret Remove unused io util writer & volume host GetWriter() 2018-07-09 14:09:48 -07:00
storageos Avoid overflowing int64 in RoundUpSize and return error if overflow int 2018-07-23 13:48:45 -04:00
testing extend FakeVolumePlugin to implement VolumePluginWithAttachLimits interface 2018-07-16 09:09:48 -07:00
util Merge pull request #63176 from NetApp/bug/59946 2018-07-25 16:19:01 -07:00
validation Run hack/update-bazel.sh 2018-06-22 16:22:57 -07:00
vsphere_volume Avoid overflowing int64 in RoundUpSize and return error if overflow int 2018-07-23 13:48:45 -04:00
BUILD Remove unused io util writer & volume host GetWriter() 2018-07-09 14:09:48 -07:00
OWNERS Update volume OWNERS to reflect active sig-storage reviewers 2017-10-26 13:26:33 -07:00
doc.go
metrics_cached.go
metrics_du.go Rename Du() to DiskUsage() for more expressive 2018-05-22 10:52:06 +08:00
metrics_du_test.go
metrics_errors.go
metrics_nil.go
metrics_nil_test.go
metrics_statfs.go update import 2018-02-27 20:23:35 +08:00
metrics_statfs_test.go
plugins.go Remove unused io util writer & volume host GetWriter() 2018-07-09 14:09:48 -07:00
plugins_test.go correct the expected value in plugintest 2018-02-25 15:14:55 +08:00
volume.go Merge pull request #63193 from lichuqiang/provision_0425 2018-06-05 15:31:58 -07:00
volume_linux.go Add more volume types in e2e and fix part of them. 2018-05-02 10:31:42 +08:00
volume_unsupported.go Add more volume types in e2e and fix part of them. 2018-05-02 10:31:42 +08:00