Commit Graph

3296 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
8b787f3a22 Merge pull request #100741 from mengjiao-liu/fix-test-err
Fix  incorrect test code in pkg/volume/csi/csi_attacher_test.go file
2021-06-08 08:33:12 -07:00
Kubernetes Prow Robot
0322d34a3e Merge pull request #100937 from mengjiao-liu/fix-metrics-nil-pointer
Fix csi_client_test.go metrics nil pointer dereference
2021-06-08 07:27:14 -07:00
Kubernetes Prow Robot
dff5940ac3 Merge pull request #97534 from heqg/typo01
fix Spelling error for klog
2021-06-06 22:24:39 -07:00
Kubernetes Prow Robot
29a8105cec Merge pull request #101272 from Jiawei0227/deprecateflag
Remove CSIMigrationvSphereComplete flag
2021-06-05 10:40:38 -07:00
Hemant Kumar
f5739a15d1 The test was not very useful and required elevated access 2021-06-04 15:48:35 -04:00
Kubernetes Prow Robot
38783bfeb7 Merge pull request #102059 from jsafrane/fix-consistentread
Retry reading /proc/mounts when unable to get a consistent read
2021-06-03 21:59:37 -07:00
Kubernetes Prow Robot
807e70c46f Merge pull request #101605 from njuptlzf/flexvloume_test
cleanup: delete tempDir correctly after flexvloume_test is executed
2021-06-01 19:48:33 -07:00
Jan Safranek
f9a04f3bc4 Move error reporting to volume plugins
Move reporting of GetReliableMountRefs error to the volume plugins that
have more context about severity of the error.
2021-05-27 18:30:17 +02:00
Kubernetes Prow Robot
81e159f0b0 Merge pull request #101862 from jsafrane/fix-fc-detach-retry
Retry detaching FibreChannel volume few times
2021-05-27 07:14:23 -07:00
Kubernetes Prow Robot
f7e62dc5bb Merge pull request #100746 from mengjiao-liu/fix-nil-call
Fixed a possible nil pointer dereference caused by variable `plug`
2021-05-26 14:49:38 -07:00
Jan Safranek
a95842095e Retry reading /proc/mounts indifinetly in FC and iSCSI volume reconstruction
iSCSI and FC volume plugins do not implement real 3rd party attach/detach.
If reconstruction fails with an error on a FC or iSCSI volume, it will not
be unmounted from the volume global dir and at the same time it will be
marked as unused, to be available to be mounted on another node.

The volume can then be mounted on several nodes, resulting in volume
corruption.

The other block based volume plugins implement attach/detach that either
makes the volume stuck (can't be detached) or will be force-detached from a
node before attaching it somewhere else.
2021-05-26 23:08:19 +02:00
Jan Safranek
64e8396e30 Retry detaching FibreChannel volume few times
When UnmountDevice() of a FibreChannel volume fails after unmounting the
device and before the device is fully cleaned up, subsequent
UnmountDevice() retry won't find the device mounted and return without
retrying the device cleanup.

Therefore implement its own retry inside UnmountDevice() to make sure that
the volume devices are either fully cleaned or the error is serius enough
that even 1 minute of trying does not help.
2021-05-26 23:05:06 +02:00
刁浩 10284789
5908cd0d90 simplify returning boolean expression in /pkg/volume
Signed-off-by: 刁浩 10284789 <diao.hao@zte.com.cn>
2021-05-25 02:39:55 +00:00
Kubernetes Prow Robot
f545438bd3 Merge pull request #101587 from nixpanic/in-tree/block-metrics
Fix a panic for in-tree drivers that partialy support Block volume metrics
2021-05-24 16:18:47 -07:00
Kubernetes Prow Robot
f803daaca7 Merge pull request #101510 from huchengze/patch-12
migrate log in pkg/volume/plugins.go
2021-05-20 21:14:57 -07:00
mengjiao.liu
c24b87b133 Fixed a possible nil pointer dereference caused by variable plug 2021-05-21 10:17:04 +08:00
Niels de Vos
b997e0e4d6 Add SupportsMetrics() for Block-mode volumes
Volumes that are provisioned with `VolumeMode: Block` often have a
MetrucsProvider interface declared in their type. However, the
MetricsProvider should implement a GetMetrics() function. In the cases
where the storage drivers do not implement GetMetrics(), a panic can
occur.

Usual type-assertions are not sufficient in this case. All assertions
assume the interface is present. There is no straight forward way to
verify that a valid GetMetrics() function is provided.

By adding SupportsMetrics(), storage driver implementations require
careful reviewing for metrics support.
2021-05-20 17:10:23 +02:00
Niels de Vos
e7dedc5cd1 Support Capacity metric for block PVCs for in-tree drivers
PR #97972 added support for gathering metrics for Block PVCs provided by
CSI drivers. The in-tree drivers can support at leas the most basic
metric; Capacity.
2021-05-20 16:37:12 +02:00
Niels de Vos
2b9c81b87d Add helper functions for Block volume Capacity detection
Similar to how NewMetricsStatFS() works, the new NewMetricsBlock()
provides the GetMetrics() interface for Block volumes.

Additional metrics for Block volumes are difficult to gather. There is
no guarantee that there is a filesystem on the volume, which makes most
of the volume metrics useless.

Advanced storage might be able to detect the actual consumption (when
thin-provisioned) vs the capacity. However, this is out of the scope for
a standard helper function and requires intimate knowledge of the used
storage system.
2021-05-20 16:37:12 +02:00
Jiawei Wang
94db1e18ba Remove scaleio from volume plugins 2021-05-19 10:35:21 -07:00
Kubernetes Prow Robot
d01a5cae9c Merge pull request #97965 from chymy/fix-spell
Fix some case issue
2021-05-16 06:31:59 -07:00
Kubernetes Prow Robot
6768ac8115 Merge pull request #100894 from clickyotomy/sk/loop-dev-sysfs
Handle invalid `losetup' options
2021-05-12 05:05:39 -07:00
Kubernetes Prow Robot
160cdbbdca Merge pull request #101534 from kassarl/issue-98281
Use GA topology labels for Azuredisk
2021-05-07 13:32:00 -07:00
Kubernetes Prow Robot
c9bd08a3c4 Merge pull request #101046 from lojies/fixbrokenlink
fix broken link in some files
2021-05-07 13:31:34 -07:00
Kubernetes Prow Robot
c08526c7f7 Merge pull request #100216 from yangjunmyfm192085/run-test29
Fix misspelling of condition.
2021-05-07 00:21:02 -07:00
Jiawei Wang
ce87fc97a1 DAdd some soon-to-be-removed plugins to deprecated volume plugin list 2021-05-06 18:41:37 -07:00
Kubernetes Prow Robot
4ad08fa5b6 Merge pull request #101115 from wangyx1992/capital-log
cleanup: fix log capitalization in volume package
2021-05-06 03:51:16 -07:00
Jiawei Wang
fa1a4100c6 Remove CSIMigrationVSphereComplete flag 2021-05-04 21:38:47 -07:00
Srinidhi Kaushik
be63462f93 Handle invalid "losetup" options
The non "util-linux" versions of "losetup" don't seem to have
options like "-j" ("--associated") which lists the loop devices
associated with the file, or "--show" which  displays the name
of the assigned loop device for a file.

For instance, when "-j" is used, "GetLoopDevice()" fails with:

    $ losetup -j /path/to/file
    losetup: unrecognized option: j
    BusyBox v1.32.1 () multi-call binary.

Add a fallback option to lookup the device from "sysfs" in cases
where "losetup" fails for an invalid option. This can be done by
reading the backing file from "/sys/block/loop*/loop/backing_file"
for each of the devices listed there.

Signed-off-by: Srinidhi Kaushik <shrinidhi.kaushik@gmail.com>
2021-05-02 20:02:51 +05:30
Kubernetes Prow Robot
dfc91819b7 Merge pull request #101067 from Elbehery/fix-nfs-storage-ipv6_add_square_brackets
Fix mounting NFS resources in IPv6 bare-metal environment #101066
2021-05-01 20:58:00 -07:00
njuptlzf
2335547a9c cleanup: delete tempDir after flexvloume_test is executed 2021-04-29 17:20:58 +08:00
Kubernetes Prow Robot
7f8539ff20 Merge pull request #101441 from dobsonj/101332-deprecate-mount-path-removal
Deprecate removal of CSI nodepublish path by kubelet (#101332)
2021-04-28 10:32:50 -07:00
elbehery
859fe6899c add expectedDevice as arg for testing 2021-04-28 17:25:09 +02:00
elbehery
f9befb90a4 add pointer mutation review 2021-04-28 17:25:09 +02:00
elbehery
e05a8403c8 fix ipv6 test case 2021-04-28 17:25:09 +02:00
elbehery
124b71bd11 add test for ipv4 literal 2021-04-28 17:25:09 +02:00
elbehery
5b52146614 fix-nfs-storage-ipv6_add_square_brackets 2021-04-28 17:25:09 +02:00
Jonathan Dobson
260426bf44 clarify deprecation comment 2021-04-27 17:52:40 -06:00
Jonathan Dobson
75a7966414 move deprecation comment to TearDownAt function 2021-04-27 11:40:12 -06:00
Jonathan Dobson
e92dc8d9be Deprecate removal of CSI nodepublish path by kubelet (#101332) 2021-04-27 08:41:47 -06:00
huccshen
45ec665142 migrate log in pkg/volume/plugins.go 2021-04-27 14:37:25 +08:00
Laila Kassar
c3b8f242a5 Updated topology labels for Azure
Modified to use v1 labels
2021-04-26 07:35:10 +00:00
Niels de Vos
de3a4429d9 Make type BlockVolume a MetricsProvider 2021-04-22 08:36:20 +02:00
Niels de Vos
e99ced3114 Add support for gethering metrics from CSI block-mode volumes 2021-04-22 08:36:20 +02:00
Kubernetes Prow Robot
7ed02d61d1 Merge pull request #101235 from andyzhangx/azurefile-inline-ns-translation
fix: azure file inline volume namespace issue in csi migration translation
2021-04-21 19:15:44 -07:00
Kubernetes Prow Robot
a5a155aaab Merge pull request #101072 from gavinfish/volume-log
Fix log format in flexvolume
2021-04-21 18:11:41 -07:00
Kubernetes Prow Robot
3e6f244851 Merge pull request #100999 from lojies/cispkgcleanup
code cleanup for pkg volume csi
2021-04-20 00:42:33 -07:00
andyzhangx
e10d3948f5 fix: azure file namespace issue in csi translation
fix build failure

fix comments
2021-04-20 07:23:09 +00:00
Kubernetes Prow Robot
a0e6e491e9 Merge pull request #99069 from phantooom/master
kubelet: fix raw block mode CSI NodePublishVolume stage miss pod info
2021-04-15 14:47:00 -07:00
phantooom
82c2266f25 chore: make csi getPodInfoAttrs func private 2021-04-15 20:51:51 +08:00