Commit Graph

3015 Commits

Author SHA1 Message Date
Ted Yu
f48e5de963 Remove the exponential backoff in NodeGetInfo 2020-02-07 06:39:12 -08:00
Kubernetes Prow Robot
c24fa741ae
Merge pull request #87499 from ejweber/fc-mount-options
FC mount options
2020-02-07 05:55:56 -08:00
Kubernetes Prow Robot
69e01784c1
Merge pull request #87838 from Ikuyadeu/path2filepath
Move 'path' package usage to 'path/filepath' (repeat the #87713)
2020-02-06 17:48:11 -08:00
Ted Yu
871739e4df Check getNodeInfoError against nil 2020-02-06 10:57:43 -08:00
Yuki Ueda
d1bc1875aa Move 'path' package usage to 'path/filepath' 2020-02-05 14:29:27 +09:00
Kubernetes Prow Robot
76c89645c5
Merge pull request #87713 from kkmsft/filepath-fixes-windows
Move 'path' package usage to 'path/filepath'.
2020-02-03 17:07:25 -08:00
Eric Weber
adcdb2fd72 Enable FC mount options 2020-02-03 16:13:58 -06:00
Kubernetes Prow Robot
845b232321
Merge pull request #87451 from jnaulty/jnaulty/fix-aws-ebs-createvolume-signature
Fix CreateVolume signature in comment
2020-02-03 10:51:21 -08:00
Alena Prokharchyk
331cd94ccc Ineffassign fixes for pkg/volume
Along resolves errors whitelisted in hack/.staticcheck_failures
2020-01-31 10:14:45 -08:00
Kubernetes Prow Robot
0b18af6d43
Merge pull request #87384 from yuxiaobo96/k8s-cleanup
cleanup: delete unused func
2020-01-30 16:58:47 -08:00
Krishnakumar R(KK)
72fe307b35 Move 'path' package usage to 'path/filepath'.
In case of windows, the path package functions such as 'Dir' returns faulty directory path.
For eg: 'path.Dir' on 'c:\var\lib\kubelet\pods' returns '.', where as the result should
have been 'c:\var\lib\kubelet'. The filepath package returns the right values.
2020-01-30 15:53:18 -08:00
Jordan Liggitt
cd1059e3c4 Revert "Merge pull request #87258 from verult/slow-rxm-attach"
This reverts commit 15c3f1b119, reversing
changes made to 52d7614a8c.
2020-01-29 14:58:32 -05:00
Kubernetes Prow Robot
17936ff63b
Merge pull request #87544 from SenXuDC/staticcheck
fix static check in pkg/volume/flocker
2020-01-29 07:32:42 -08:00
Maxime VISONNEAU
bea4b61158
Fixed a failing test on a RBD mount scenario 2020-01-28 12:44:34 +00:00
Cheng Xing
c6a03fa5be Parallelize attach operations across different nodes for volumes that allow multi-attach 2020-01-27 15:02:25 -08:00
Cheng Xing
37957e2a0d Refactor operation keys for NestedPendingOperations 2020-01-27 10:42:16 -08:00
SenXuDC
7c72b5791b fix static check in pkg/volume/flocker 2020-01-25 10:51:55 +08:00
Kubernetes Prow Robot
6c693549a3
Merge pull request #87183 from Aresforchina/fix-staticcheck-test15
fix-staticcheck:pkg/volume/scaleio/
2020-01-23 22:20:31 -08:00
John Naulty
80c3f500b6
Fix CreateVolume signature in comment
The CreateVolume function for aws-ebs provsiioner returns fstype, which
was missing from the commented section above the function declaration.
2020-01-22 01:06:26 -08:00
Kubernetes Prow Robot
f680c261e6
Merge pull request #87074 from yuxiaobo96/k8s-staticcheck
fix staticcheck: pkg/volume/awsebs
2020-01-20 03:09:37 -08:00
yuxiaobo
221396ac35 cleanup: delete unused func
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2020-01-20 18:20:57 +08:00
yuxiaobo
72f34b817e staticcheck: pkg/volume/fc, pkg/volume/portworx and pkg/volume/vsphere_volume
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2020-01-20 16:47:54 +08:00
Kubernetes Prow Robot
3d8317ae91
Merge pull request #87139 from yuxiaobo96/k8s-staticcheck2
fix staticcheck:pkg/volume/cinder
2020-01-19 21:47:36 -08:00
Kubernetes Prow Robot
f88f58cb79
Merge pull request #87245 from 928234269/fix_staticcheck
fix staticcheck errors in pkg/volume/hostpath.
2020-01-17 12:15:18 -08:00
Sakura
fe8b32317f
delete unused field
Signed-off-by: Sakura <longfei.shang@daocloud.io>
2020-01-17 19:34:48 +08:00
Paul Morie
afaea605f4 Remove Brad Childs from OWNERS files 2020-01-16 15:21:34 -05:00
Kubernetes Prow Robot
0c1d714627
Merge pull request #87128 from Aresforchina/fix-staticcheck-test12
fix-staticcheck:pkg/volume/emptydir
2020-01-16 07:48:50 -08:00
Kubernetes Prow Robot
15aa065e86
Merge pull request #86569 from zouyee/btos
using string instead of byte
2020-01-15 08:25:49 -08:00
Sakura
4143bc7a96
fix staticcheck errors in pkg/volume/hostpath.
Signed-off-by: Sakura <longfei.shang@daocloud.io>
2020-01-15 22:54:48 +08:00
Aresforchina
514bdbedac fix-static:pkg/volume/scaleio/ 2020-01-15 09:53:27 +08:00
yuxiaobo
da15570daa fix staticcheck:pkg/volume/cinder
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2020-01-13 18:20:23 +08:00
Aresforchina
e62f9625cf fix-static:pkg/volume/emptydir 2020-01-13 15:23:45 +08:00
sunxiaofei03
330159c0a4 fix orphaned pod flexvolume can not be cleaned up 2020-01-11 14:54:48 +08:00
yuxiaobo
c5764735e2 fix staticcheck:pkg/volume/awsebs
Signed-off-by: yuxiaobo <yuxiaobogo@163.com>
2020-01-10 18:36:39 +08:00
Rita Zhang
b062fcb117
Update Azure owners 2020-01-09 18:35:18 -08:00
Kubernetes Prow Robot
d6412b856f
Merge pull request #84345 from danielqsj/withdialer
replace grpc.WithDialer which is deprecated
2020-01-06 15:56:17 -08:00
Kubernetes Prow Robot
4158e7c1de
Merge pull request #85123 from danielqsj/apierrs
Unify aliases for "k8s.io/apimachinery/pkg/api/errors"
2019-12-26 17:59:38 -08:00
danielqsj
19fe9f8d94 replace grpc.WithDialer which is deprecated 2019-12-26 17:46:59 +08:00
danielqsj
5bc0e26c19 unify alias of api errors under pkg and staging 2019-12-26 16:42:28 +08:00
andyzhangx
36393390f4 fix: azure disk could not mounted on Standard_DC4s/DC2s instances 2019-12-25 13:55:58 +00:00
zouyee
bae72ee8d2 using string instead of byte
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2019-12-24 09:23:02 +08:00
SataQiu
2497a1209b bump k8s.io/utils version 2019-12-21 14:54:44 +08:00
Kubernetes Prow Robot
40df9f82d0
Merge pull request #82492 from gnufied/fix-uncertain-mounts
Fix uncertain mounts
2019-12-17 14:49:57 -08:00
Ted Yu
62d7772882 Check FileInfo against nil during walk of container dir path 2019-12-16 17:59:17 -08:00
Hemant Kumar
ca532c6fb2 Ensure that error is returned on NodePublish 2019-12-11 22:10:09 -05:00
Hemant Kumar
4b8e552a88 Use typed errors for special casing volume progress
Use typed errors rather than operation status for
indicating operation progress
2019-12-04 14:48:30 -05:00
Kubernetes Prow Robot
97e34ee223
Merge pull request #85475 from andyzhangx/upgrade-azure-storage-lib
upgrade api-version to fix azure file AuthorizationFailure
2019-12-02 17:07:10 -08:00
Hemant Kumar
0741f6fa29 Ensure that metadata directory is not created if secret is not found
To ensure that metadata directory is not created if secret is not
found, we will move fetching secrets bit more earlier in the code.
2019-12-02 12:09:38 -05:00
Hemant Kumar
309c6f863a Handle the case of remounts correctly 2019-12-02 12:09:38 -05:00
Hemant Kumar
5feea93163 Rename MarkVolumeMountedOpts to MarkVolumeOpts
Also remove VolumeNotMounted state
2019-12-02 12:09:38 -05:00
Hemant Kumar
cdbd3ba5c2 Change interface of SetUp function 2019-12-02 12:09:38 -05:00
Hemant Kumar
db9ac38592 Change signature of MountDevice function and remove MountDeviceWithStatusTracking 2019-12-02 12:09:38 -05:00
Hemant Kumar
0c52b6606e Refactor NodeStage function
Timeout operations should result in
Fix unit tests for uncertainDeviceGlobalMounts
2019-12-02 12:09:38 -05:00
Hemant Kumar
57019e0628 Add tests for verifying in-progress state 2019-12-02 12:09:38 -05:00
Hemant Kumar
27a70a9260 Update generated files 2019-12-02 12:09:38 -05:00
Hemant Kumar
321e99367a Add code to handle Setup With Status tracking 2019-12-02 12:09:38 -05:00
Hemant Kumar
dc9e64c31e Implement return status codes 2019-12-02 12:02:27 -05:00
Hemant Kumar
50dbcb3e00 Make sure PodExistsInVolume does not uses uncertain volumes 2019-12-02 12:01:40 -05:00
Hemant Kumar
34a6007dfe Add code to mark volume as uncertain
Update bazel files
Add tests for volume mounts in uncertain state
2019-12-02 12:01:40 -05:00
Hemant Kumar
a795f3de88 Add code for introducing uncertain state of mounts
Add a comment about volumestate
2019-12-02 11:57:40 -05:00
Ryan Roemmich
d44583d28a
Fix iscsi refcounter in the case of no Block iscsi volumes 2019-11-27 15:50:40 -08:00
Kubernetes Prow Robot
3aeb38afd3
Merge pull request #85493 from cofyc/local-owner
Add cofyc as owner of pkg/volume/local
2019-11-22 17:31:41 -08:00
Kubernetes Prow Robot
300ca89e60
Merge pull request #85426 from davidz627/fix/testCtx
Plumb test state through to fake volume host creation for error handling
2019-11-22 17:31:22 -08:00
Yecheng Fu
96eb647898 add cofyc as local volume owner 2019-11-21 09:38:49 +08:00
andyzhangx
6b73c9f8c2 upgrade api-version to fix azure file AuthorizationFailure
fix build failure
2019-11-20 05:41:25 +00:00
Benjamin Elder
753774d9ea add providerless tag to vsphere volume code 2019-11-19 09:47:45 -08:00
Benjamin Elder
b100bf9654 add providerless tags to new awsebs code 2019-11-19 09:47:45 -08:00
David Zhu
21f7060c8f Plumb test state through to fake volume host creation for error handling 2019-11-18 14:45:01 -08:00
David Zhu
86f20db7d0 Panic on error when creating fake volume host, add a TODO to clean up later 2019-11-15 11:23:32 -08:00
David Zhu
1a47bf54e2 De-race some CSI unit tests that were initializing the plugin manager…ger (and plugins) twice. Set some const variables earlier to support node info manager initialization and wait for initialization to complete before finishing plugin setup. 2019-11-15 11:23:32 -08:00
Travis Rhoden
0c5c3d8bb9
Remove pkg/util/mount (moved out of tree)
This patch removes pkg/util/mount completely, and replaces it with the
mount package now located at k8s.io/utils/mount. The code found at
k8s.io/utils/mount was moved there from pkg/util/mount, so the code is
identical, just no longer in-tree to k/k.
2019-11-15 08:29:12 -07:00
Kubernetes Prow Robot
372ebd24f5
Merge pull request #83098 from ddebroy/disable-intree
CSI Migration phase 2: disable probing of in-tree plugins
2019-11-14 20:51:42 -08:00
Masaki Kimura
4578c6c8ce Separate staging/publish and unstaging/unpublish logics for block 2019-11-15 01:55:20 +00:00
Masaki Kimura
7caf731773 Change publish path for CSI block volume per pod
This change is to allow CSI driver to publish the same volume for multipe pods on the same node.
2019-11-15 01:55:15 +00:00
Deep Debroy
129f15328b Disable in-tree plugins migrated to CSI
Signed-off-by: Deep Debroy <ddebroy@docker.com>
2019-11-14 17:28:21 -08:00
Masaki Kimura
a275026ad4 Split CustomBlockVolumeMapper and CustomBlockVolumeUnmapper
- Move SetUpDevice to BlockVolumeStager
  - Move MapPodDevice to BlockVolumePublisher
  - Move TearDownDevice to BlockVolumeUnstager
  - Move UnmapPodDevice to BlockVolumeUnpublisher
  - Implement BlockVolumePublisher only in local and csi plugin
  - Implement BlockVolumeUnstager only in fc, iscsi, rbd, and csi plugin
  - Implement BlockVolumeStager and BlockVolumeUnpublisher only in csi plugin
2019-11-14 22:01:19 +00:00
Masaki Kimura
f363a03f0b Refactor BlockVolumeMapper and BlockVolumeUnmapper interface
- Rename MapDevice to MapPodDevice in BlockVolumeMapper
- Add UnmapPodDevice in BlockVolumeUnmapper (This will be used by csi driver later)
- Add CustomBlockVolumeMapper and CustomBlockVolumeUnmapper interface
- Move SetUpDevice and MapPodDevice to CustomBlockVolumeMapper
- Move TearDownDevice and UnmapPodDevice to CustomBlockVolumeUnmapper
- Implement CustomBlockVolumeMapper only in local and csi plugin
- Implement CustomBlockVolumeUnmapper only in fc, iscsi, rbd, and csi plugin
- Change MapPodDevice to return path and SetUpDevice not to return path
2019-11-14 22:01:11 +00:00
Masaki Kimura
560d9c56eb Change mount.NewOSExec to utilexec.New 2019-11-14 15:58:27 +00:00
Masaki Kimura
8a09460c2f Change getDeviceMajorMinor to use unix.Stat 2019-11-14 15:58:27 +00:00
Masaki Kimura
aee875a855 Fix error messages in operation_generator.go 2019-11-14 15:58:27 +00:00
Masaki Kimura
a2cbc028f4 Remove remaining empty file in unmapBindMountDevice 2019-11-14 15:58:27 +00:00
Masaki Kimura
dd945424e1 Rename IsBindMountExist to IsDeviceBindMountExist 2019-11-14 15:58:26 +00:00
Masaki Kimura
bee6514d79 Remove klog for output error instead return err with context 2019-11-14 15:58:26 +00:00
Masaki Kimura
7abb704e7b Improve comments for volume path hanlder and volume.go 2019-11-14 15:58:26 +00:00
Masaki Kimura
5a351e3014 Check and return error first in IsSymlinkExist and IsBindMountExist 2019-11-14 15:58:26 +00:00
Masaki Kimura
8a159d7253 Move MapBlockVolume call to operation_generator and add UnmapBlockVolume 2019-11-14 15:58:26 +00:00
Masaki Kimura
68be3947b8 Make descriptor lock per pod and release it per pod
This change is needed to avoid unmapVolumeFunc for one pod blocked,
when the lock for the same volume is taken for another pod.
2019-11-14 15:58:26 +00:00
Masaki Kimura
2ecdc5e8d1 Change globalMapPath to bind mount from symlink
This change is needed to make descriptor lock per pod, in the next commit.
If losetup is called for symlink, path in the output for losetup is resolved,
as a result, we can't distinguish which path the lock is taken.
2019-11-14 15:58:26 +00:00
Travis Rhoden
367f879131
Retire mount.Exec for k8s.io/utils/exec
This patch removes mount.Exec entirely and instead uses the common
utility from k8s.io/utils/exec.

The fake exec implementation found in k8s.io/utils/exec differs a bit
than mount.Exec, with the ability to pre-script expected calls to
Command.CombinedOutput(), so tests that previously relied on a callback
mechanism to produce specific output have been updated to use that
mechanism.
2019-11-13 14:09:57 -07:00
Kubernetes Prow Robot
c580a12c8e
Merge pull request #83568 from bertinatto/volume_limits_ga
Promote volume limits to GA
2019-11-12 11:50:22 -08:00
Kubernetes Prow Robot
897ce3073c
Merge pull request #84533 from davidz627/fix/deprecatedPath
Remove plugin watching of deprecated directory and CSI v0 support in accordance with deprecation policy
2019-11-12 04:48:20 -08:00
Fabio Bertinatto
affcd0128b Promote volume limits to GA 2019-11-12 09:43:53 +01:00
David Zhu
802fe12803 Remove plugin watching of deprecated directory {kubelet_root_dir}/plugins and support for CSI V0 in accordance with deprecation announcement in https://v1-13.docs.kubernetes.io/docs/setup/release/notes/ 2019-11-11 11:42:58 -08:00
Travis Rhoden
1fd8921546
Move mount/fake.go to mount/fake_mount.go
This patch moves fake.go to mount_fake.go, and follows to principle of
always returning a discrete type rather than an Interface. All callers
of "FakeMounter" are changed to instead use "NewFakeMounter()". The
FakeMounter "Log" struct member is changed to not be exported, and
instead only access through a new "GetLog()" method.
2019-11-08 08:07:41 -07:00
Kubernetes Prow Robot
59aa8fd99e
Merge pull request #82698 from janario/fix/umount-subpath-warns
Unmount subpath should only scan the first level of files/directories
2019-11-08 02:16:14 -08:00
Kubernetes Prow Robot
bae8f56bb1
Merge pull request #84865 from deads2k/feature-gate-fail
panic in featuregate if a requested feature is unknown
2019-11-07 16:20:34 -08:00
David Eads
7d897d5f77 make azure fail if feature gates are not registered 2019-11-07 12:42:09 -05:00
Janario Oliveira
c9e97151b3 Changed unmount function for subpath with dirs 2019-11-07 10:05:26 +01:00
Janario Oliveira
cb0ab22b2e Added test case for subpath mount with file 2019-11-07 10:05:26 +01:00
Janario Oliveira
2ca213579d Renamed function 2019-11-07 10:05:26 +01:00
Janario Oliveira
439ce51441 Changed test case to use filepath.Walk 2019-11-07 10:05:26 +01:00
Janario Oliveira
67ec00d6b8 Unmount subpath should only scan the first level dir 2019-11-07 10:05:26 +01:00
Jordan Liggitt
297570e06a hack/update-vendor.sh 2019-11-06 17:42:34 -05:00
Kubernetes Prow Robot
b01ac96bd4
Merge pull request #84770 from mikedanese/uuid
remove github.com/pborman/uuid
2019-11-05 08:47:05 -08:00
Kubernetes Prow Robot
1488460cd2
Merge pull request #84605 from andyzhangx/byok
add azure disk encryption(SSE+CMK) support
2019-11-04 23:16:52 -08:00
Mike Danese
a4ca9e6c93 migrate callers to g/g/uuid 2019-11-04 23:15:29 -08:00
Kubernetes Prow Robot
1d1385af91
Merge pull request #83474 from msau42/topology-ga
CSI Topology ga
2019-11-04 15:28:27 -08:00
Kubernetes Prow Robot
08410cbf06
Merge pull request #84365 from codenrhoden/rm-mount-container
Remove Alpha feature MountContainers
2019-11-03 21:29:41 -08:00
Kubernetes Prow Robot
ed5b038313
Merge pull request #84218 from cofyc/fix74552
Support local filesystem volume with block source reconstruction and add related e2e tests
2019-10-31 21:53:36 -07:00
andyzhangx
f10d44bad2 feat: add azure disk encryption(SSE+CMK) support 2019-10-31 13:24:43 +00:00
Yecheng Fu
0fd4cbcac4 log the reconstructed device and add break 2019-10-31 21:09:13 +08:00
David Zhu
3575720154 Add davidz627 as owner of pkg/volume/csi 2019-10-30 13:35:44 -07:00
Kubernetes Prow Robot
a45917008f
Merge pull request #84301 from yutedz/pvc-expand-fail
Add event for pvc in case node expansion fails
2019-10-28 14:09:29 -07:00
Michelle Au
fb6dfeb718 Convert attach-detach controller to use v1.CSINode 2019-10-28 13:41:13 -07:00
Michelle Au
d27fa9d890 Kubelet creates v1.CSINode 2019-10-28 13:41:13 -07:00
Michelle Au
8f6ab81cd4 Move feature gate to GA 2019-10-28 13:41:13 -07:00
Yecheng Fu
36a54399a6 support local volume with block source reconstruction 2019-10-28 10:34:57 +08:00
Kubernetes Prow Robot
24ae4d6718
Merge pull request #84173 from cofyc/fix83693
Support local volume block mode reconstruction
2019-10-25 19:23:23 -07:00
Kubernetes Prow Robot
cb0f80efe7
Merge pull request #84321 from cduchesne/csi-detach-timeout
CSI: modify detach timeout to match attach timeout
2019-10-25 09:54:13 -07:00
Kubernetes Prow Robot
cbf1e2d360
Merge pull request #82794 from ingvagabund/fake-clientset-enforce-exact-much-for-get
Require exact match when calling Get method within fake clientset
2019-10-25 09:53:39 -07:00
Travis Rhoden
2e054a4f4c
Remove Alpha feature Mount Containers
The alpha feature for mount containers is unused, and is
superseded by CSI. By removing it, we can remove a lot of unnecessary
code, and also clean up the mount library even more before moving it out
of tree.
2019-10-25 09:25:13 -06:00
Kubernetes Prow Robot
8c1ffb59e3
Merge pull request #84083 from ZP-AlwaysWin/dev02
cleanup util code
2019-10-24 09:49:23 -07:00
Ted Yu
e8bd5c7785 Add event for pvc in case node expansion fails 2019-10-24 09:11:01 -07:00
Chris Duchesne
b4e0f1b8f8 modify detach timeout to be csiTimeout 2019-10-24 07:53:16 -07:00
Kubernetes Prow Robot
900c0cf0b6
Merge pull request #84137 from cwdsuzhou/Octo/add_success_events
Add an event to pvc when node expand successfully
2019-10-24 07:33:15 -07:00
Jan Chaloupka
d32c76fc03 Require exact match when calling Get method within fake clientset
`Get` method within the fake clientset returns an object that would not be normally returned when using the real clientset. Reproducer:

```go
package main

import (
	v1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/client-go/kubernetes/fake"
)

func main () {
	cm := &v1.ConfigMap{
		ObjectMeta: metav1.ObjectMeta{Namespace: metav1.NamespaceSystem, Name: "cm"},
		}

	client := fake.NewSimpleClientset(cm)
	obj, err := client.CoreV1().ConfigMaps("").Get("", metav1.GetOptions{})
	if err != nil {
		panic(err)
	}
	fmt.Printf("obj: %#v\n", obj)
}
```

stored under `test.go` of `github.com/kubernetes/kubernetes` (master HEAD) root directory and ran:

```sh
$ go run test.go
obj: &v1.ConfigMap{TypeMeta:v1.TypeMeta{Kind:"", APIVersion:""}, ObjectMeta:v1.ObjectMeta{Name:"cm", GenerateName:"", Namespace:"kube-system", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{wall:0x0, ext:0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string(nil), Annotations:map[string]string(nil), OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ClusterName:"", ManagedFields:[]v1.ManagedFieldsEntry(nil)}, Data:map[string]string(nil), BinaryData:map[string][]uint8(nil)}
```

As you can see fake clientset with a "test" configmap is created. When getting the object through the clientset back, I intentionally set the object name to an empty string. I would expect to get an error saying config map "" was not found. However, I get "test" configmap instead.

Reason for that is inside implementation of `filterByNamespaceAndName` private function:
```go
func filterByNamespaceAndName(objs []runtime.Object, ns, name string) ([]runtime.Object, error) {
	var res []runtime.Object

	for _, obj := range objs {
		acc, err := meta.Accessor(obj)
		if err != nil {
			return nil, err
		}
		if ns != "" && acc.GetNamespace() != ns {
			continue
		}
		if name != "" && acc.GetName() != name {
			continue
		}
		res = append(res, obj)
	}

	return res, nil
}
```

When `name` is empty, `name != "" && acc.GetName() != name` condition is false and thus `obj` is consider as a fit.

[1] https://github.com/kubernetes/client-go/blob/master/testing/fixture.go#L481-L493
2019-10-24 14:41:48 +02:00
ZP-AlwaysWin
9ca7888acc remove the extra space added 2019-10-24 17:17:31 +08:00
Yecheng Fu
46b1e264dc support local volume block mode reconstruction 2019-10-23 19:32:15 +08:00
Kubernetes Prow Robot
18cef954a1
Merge pull request #83591 from jingxu97/Oct/cache
Flush data cache during unmount device for GCE-PD in Windows
2019-10-21 21:11:36 -07:00
caiweidong
909be01bd6 Add an event to pvc when node expand successfully 2019-10-21 11:33:46 +08:00
Kubernetes Prow Robot
fa99d4068b
Merge pull request #83466 from wongma7/block-reconstruct
Fix AWS block volume reconstruction to be like file
2019-10-17 03:18:51 -07:00
Matthew Wong
82786ff720 Fix AWS block volume reconstruction to be like file 2019-10-16 14:27:57 -07:00
Jing Xu
1636b2b452 Flush data cache during unmount device for GCE-PD in Windows
This PR fixes the issue mentioned in #83590 for GCE-PD. It uses
WriteVolumeCache API to writes the file system cache to disk during
UnmountDevice in Windows. Linux does not need to explicitly flush cache
because unmount will automatically sync the disk which also flush the
cache.

Change-Id: Ife2745c92b8c0446e79a52e9f9ec7851d2f6b90d
2019-10-16 10:12:35 -07:00
Kubernetes Prow Robot
0a08798b9a
Merge pull request #75588 from smileusd/rbd_info
fix rbd info when return warning information
2019-10-15 16:32:09 -07:00
Kubernetes Prow Robot
245189b8a1
Merge pull request #83747 from JohnStrunk/csi-fsgroup-fix
Improve efficiency of csiMountMgr.GetAttributes
2019-10-15 07:11:52 -07:00
Bob Killen
6e68d80013
Prune inactive owners from pkg/volume/* OWNERS files. 2019-10-13 08:44:11 -04:00
John Strunk
55881f2fc4
Improve efficiency of csiMountMgr.GetAttributes
GetAttributes is called repeatedly while setting the fsGroup of a
volume. Previously, it recalculated whether SELinux was supported during
each call. This resulted in volume.SetVolumeOwnership taking a long
time, delaying pod startup for high file count volumes.

This change checks the SELinux status once, right after node publish,
allowing GetAttributes to simply build and return a struct.

Signed-off-by: John Strunk <jstrunk@redhat.com>
2019-10-10 13:51:50 -04:00
Kubernetes Prow Robot
8098bae921
Merge pull request #83451 from jsafrane/block-reconstruct
Fix block volume reconstruction
2019-10-08 03:45:18 -07:00
Kubernetes Prow Robot
24424e26d1
Merge pull request #83104 from zouyee/gfs
IP validates if a string is a valid IP address
2019-10-07 03:13:08 -07:00
Kubernetes Prow Robot
00458855e4
Merge pull request #78411 from qingsenLi/k8s-190528
spelling error 'doen't'
2019-10-05 17:27:11 -07:00
Jan Safranek
1c8c861009 Reconstruct block PV name in all volume plugins
The PV name is often necessary to build correct symlink paths
/var/lib/kubelet/pods/{podUid}}/{DefaultKubeletVolumeDevicesDirName}/{escapeQualifiedPluginName}/{PV name}
2019-10-04 15:49:49 +02:00
David Zhu
223ef76db5 Dedupe logging for PD SetUpAt and added a slow SetVolumeOwnership warning 2019-10-03 11:10:20 -07:00
zouyee
599fa5583e IP validates if a string is a valid IP address
Signed-off-by: Zou Nengren <zouyee1989@gmail.com>
2019-10-02 08:55:08 +08:00
David Zhu
8970ec8fa7
Revert "Bugfix: remove PV dir when umount raw block device" 2019-10-01 15:14:35 -07:00
Kubernetes Prow Robot
b89220f9ca
Merge pull request #80420 from cwdsuzhou/July/mergeAttachDetachCommonFunc
Merge attach and detach common func
2019-09-30 13:08:46 -07:00
caiweidong
a890bf1175 Merge attach and detach common func 2019-09-30 17:36:14 +08:00
Kubernetes Prow Robot
14e5adfc85
Merge pull request #82683 from davidz627/fix/translationStruct
Refactor CSI Translation Library into a struct that is injected into various components to simplify unit testing
2019-09-29 10:11:37 -07:00
David Zhu
92cb06a2e7 Refactor CSI Translation Library into a struct that is injected into various components to simplify unit testing in future 2019-09-27 12:59:53 -07:00
Kubernetes Prow Robot
cd95e57c71
Merge pull request #83071 from chendotjs/bytes-equal
replace bytes.Compare() with bytes.Equal()
2019-09-27 09:57:36 -07:00
Kubernetes Prow Robot
a392897dec
Merge pull request #79784 from cwdsuzhou/July/RemoveDeviceVolumeDir
Bugfix: remove PV dir when umount raw block device
2019-09-27 02:03:36 -07:00
chenyaqi01
66be69bb0e replace bytes.Compare() with bytes.Equal() 2019-09-27 10:08:49 +08:00
Kubernetes Prow Robot
67d750bb28
Merge pull request #81916 from hwdef/fix-typo-pkg
fix typo in pkg
2019-09-26 08:35:24 -07:00
caiweidong
f30a549eb8 Bugfix: remove PV dir when umount raw block device 2019-09-26 19:46:42 +08:00
Kubernetes Prow Robot
8a106a5714
Merge pull request #82994 from yutedz/rm-persist-vol-mode
Remove unused func GetPersistentVolumeClaimVolumeMode
2019-09-25 13:51:04 -07:00
Kubernetes Prow Robot
49bd1defaa
Merge pull request #82991 from yutedz/mk-file-close
Properly close the file in makeFile
2019-09-25 13:50:54 -07:00
Kubernetes Prow Robot
71c28e9b87
Merge pull request #82972 from yutedz/high-supported-ver
Remove unnecessary sorting for highestSupportedVersion
2019-09-25 13:50:44 -07:00
Kubernetes Prow Robot
6e960ef466
Merge pull request #82964 from yutedz/csi-drv-sync-err
Check error return from WaitForCacheSync
2019-09-25 13:50:34 -07:00
Ted Yu
7c26e11d6f Properly close the file in makeFile 2019-09-25 10:14:39 -07:00
Ted Yu
23c7405fe0 Remove unnecessary sorting for highestSupportedVersion 2019-09-24 13:59:25 -07:00
Kubernetes Prow Robot
2e4d02e9ab
Merge pull request #82909 from hwdef/del-unused-var1
fix(pkg): delete unused var or const
2019-09-24 13:37:26 -07:00
Kubernetes Prow Robot
ac70f166b1
Merge pull request #82976 from yutedz/clean-rbd-file
Remove error check which is always false in RBDUtil#cleanOldRBDFile
2019-09-24 08:58:12 -07:00
Kubernetes Prow Robot
17b3e30c9b
Merge pull request #82974 from yutedz/csi-supp-stage
Come out of loop when RPC_STAGE_UNSTAGE_VOLUME is found
2019-09-23 17:32:20 -07:00
Ted Yu
ba45f73c1f Remove unused func GetPersistentVolumeClaimVolumeMode 2019-09-22 08:54:01 -07:00
Ted Yu
2f3e563749 Remove unreachable error check in RBDUtil#cleanOldRBDFile 2019-09-21 19:14:24 -07:00
Ted Yu
44787fe14e Come out of loop when RPC_STAGE_UNSTAGE_VOLUME is found 2019-09-21 14:23:06 -07:00
Ted Yu
384aaad468 Check error return from WaitForCacheSync 2019-09-21 07:02:51 -07:00
hwdef
386f981116 fix(pkg): delete unused var or const 2019-09-21 17:13:13 +08:00
Kubernetes Prow Robot
5f249fecb4
Merge pull request #82363 from yuxiaobo96/k8s-update3
update spelling mistakes
2019-09-20 00:08:59 -07:00
smileusd
e5304209ed fix rbd info when return warning information 2019-09-18 16:50:01 +08:00
Kubernetes Prow Robot
3a19f1e80b
Merge pull request #82472 from draveness/feature/remove-feature-gates-in-1-17
feat: cleanup several GA feature flags which should be removed in 1.17
2019-09-17 06:58:24 -07:00
Kubernetes Prow Robot
ab88ff2398
Merge pull request #82571 from haoshuwei/fix-ineffassign-in-pkg-controller
add or fix some errors return statements and ineffassign
2019-09-16 04:50:37 -07:00
haoshuwei
b752997036 add or fix some errors return statements and ineffassign
Signed-off-by: haoshuwei <haoshuwei24@gmail.com>
2019-09-14 09:26:17 +08:00
Kubernetes Prow Robot
8126201b73
Merge pull request #82697 from sttts/sttts-TestBlockMapperMapDeviceNotSupportAttach-race
Fix TestBlockMapperMapDeviceNotSupportAttach informer sync race
2019-09-13 03:32:29 -07:00
Dr. Stefan Schimanski
79b9cff948 Fix TestBlockMapperMapDeviceNotSupportAttach informer sync race 2019-09-13 10:02:19 +02:00
Kubernetes Prow Robot
ce42bc382e
Merge pull request #82528 from jsafrane/iscsi-exec-logs
Log all executed iscsiadm commands
2019-09-11 21:24:52 -07:00
Kubernetes Prow Robot
9586c602f2
Merge pull request #82486 from haoshuwei/fix-ineffassign
Fix ineffassign
2019-09-11 21:23:19 -07:00
Kubernetes Prow Robot
d1c6898ab5
Merge pull request #82474 from cwdsuzhou/du_one_file_system
Add -x to du commands to not traverse other file systems
2019-09-11 18:29:45 -07:00
Kubernetes Prow Robot
60bc301889
Merge pull request #81613 from tedyu/op-exec-vol-cont
Continue with remaining volumeAttached's in VerifyVolumesAreAttached
2019-09-10 14:31:33 -07:00
Kubernetes Prow Robot
494d4cb841
Merge pull request #79005 from cwdsuzhou/June/remove_recursion_detach
Remove recursion in waitForVolumeDetachmentInternal
2019-09-10 14:29:01 -07:00
Jan Safranek
894e6795cf Log all executed iscsiadm commands
We sometimes face issues with iSCSI PVs and it's hard to guess what's going
on without iscsiadm commands logged. Using level 5 (iscsiadm output can be
long sometimes) and explicitly avoiding logging of CHAP passwords.

In addition, log which path failed to appear after timeout, so the admin
can see which portals are not providing devices.
2019-09-10 14:31:28 +02:00
Ted Yu
8819a4b6b4 Continue with remaining volumeAttached's in VerifyVolumesAreAttached 2019-09-09 15:52:53 -07:00
haoshuwei
89a6533ef6 fix ineffassign 2019-09-09 11:34:21 +08:00
draveness
2c0d6053fa feat: remove PersistentLocalVolumes feature gates 2019-09-09 08:10:27 +08:00
yuxiaobo
f6ce8f5789 update spelling mistakes 2019-09-05 17:59:36 +08:00
Travis Rhoden
935c23f2ad
Move HostUtil to pkg/volume/util/hostutil
This patch moves the HostUtil functionality from the util/mount package
to the volume/util/hostutil package.

All `*NewHostUtil*` calls are changed to return concrete types instead
of interfaces.

All callers are changed to use the `*NewHostUtil*` methods instead of
directly instantiating the concrete types.
2019-08-30 10:14:42 -06:00
Kubernetes Prow Robot
96439cc97f
Merge pull request #82028 from codenrhoden/rename-isbind
Rename mount.IsBind to mount.MakeBindOpts
2019-08-30 00:43:32 -07:00
Kubernetes Prow Robot
4170a19749
Merge pull request #81437 from jingxu97/Aug/metricfs
Fix Windows disk usage metric measurement
2019-08-29 21:21:59 -07:00
Jing Xu
3b7e696c2f Fix Windows disk usage metric measurement
This PR will fix issue #81088. The current fs_windows utility reports
the whole file system usage instead of specific file path. This PR fix
this and walk the dir tree under the file path and collect the disk
usage.

Change-Id: I502ccf0af4bd07be69b61be043be616660499e4d
2019-08-29 15:37:25 -07:00
Kubernetes Prow Robot
e0e7fc2201
Merge pull request #80027 from ramineni/staging-openstack-provider
Move Openstack provider to staging
2019-08-29 15:35:29 -07:00
Kubernetes Prow Robot
cd9519fe95
Merge pull request #82004 from pohly/ephemeral-beta
ephemeral inline CSI volumes as beta
2019-08-29 09:30:25 -07:00
Anusha Ramineni
a75c5bc50b Move Openstack provider to staging
This commit moves the openstack provider to staging
2019-08-29 19:09:14 +05:30
Han Kang
6f70f781df add some documentation around the metrics stability migration changes for clarity 2019-08-28 11:17:33 -07:00
Han Kang
3a50917795 migrate kubelet's metrics/probes & metrics endpoint to metrics stability framework 2019-08-28 11:16:38 -07:00
Patrick Ohly
599a9faf8d storage: make tests independent of CSIInlineVolume default
Some tests assumed instead of ensuring that the CSIInlineVolume
feature is disabled.
2019-08-28 05:32:44 +02:00
caiweidong
28dc53f727 Remove recursion in waitForVolumeDetachmentInternal 2019-08-28 11:18:23 +08:00
Kubernetes Prow Robot
77277d3abf
Merge pull request #80911 from pivotal-k8s/vsphere-windows-volumes
Add support for vSphere volume mount/attach on Windows
2019-08-27 19:37:10 -07:00
Travis Rhoden
ef855c7c08
Rename mount.IsBind to mount.MakeBindOpts 2019-08-27 11:34:42 -06:00
Kubernetes Prow Robot
bc46e8fc53
Merge pull request #81739 from codenrhoden/clarify-mkdir-mkfile-behavior
Move MakeFile/Dir from HostUtil to host_path vol
2019-08-27 00:53:24 -07:00
Kubernetes Prow Robot
f789e1e55c
Merge pull request #81730 from codenrhoden/mountpoint-match
Internalize mount.Interface.IsMountPointMatch
2019-08-26 20:55:07 -07:00
Kubernetes Prow Robot
087aafc18d
Merge pull request #80568 from pohly/ephemeral-mode-check
ephemeral mode check
2019-08-26 11:53:40 -07:00