Commit Graph

3670 Commits

Author SHA1 Message Date
Andy Zhang
1ce285ad3d
Revert "removed the deprecated azureFile in-tree storage plugin" 2023-06-02 10:20:53 +08:00
Kubernetes Prow Robot
a6f641b656
Merge pull request #118236 from andyzhangx/remove-azurefile
removed the deprecated `azureFile` in-tree storage plugin
2023-05-29 09:25:54 -07:00
Kubernetes Prow Robot
cb8d9f6867
Merge pull request #117283 from defo89/pv-recycler-change-cmd
change pv recycler scrub cmd to find -delete
2023-05-26 10:50:52 -07:00
Kubernetes Prow Robot
719c9fe3f9
Merge pull request #118177 from HirazawaUi/fix-git-repo-test
Fix the git-repo test error caused by the correct use of loop variables
2023-05-26 08:55:04 -07:00
HirazawaUi
510287d344 Fix the git-repo test error caused by the correct use of loop variables 2023-05-26 21:32:36 +08:00
Kubernetes Prow Robot
bcb3d87117
Merge pull request #118070 from carlory/patch-001
legacy names of volume plugins have been gone a LONG time
2023-05-24 20:37:01 -07:00
andyzhangx
485d1631cd Remove Azure file in-tree storage plugin 2023-05-24 14:10:34 +00:00
Kubernetes Prow Robot
189fe3f3e6
Merge pull request #114806 from qingwave/fix-volume-util
fix typo in volume util
2023-05-18 08:32:34 -07:00
carlory
666be79d67 legacy names of volume plugins have been gone a LONG time 2023-05-17 17:02:44 +08:00
Kubernetes Prow Robot
76552fac38
Merge pull request #114764 from claudiubelu/unittests-7
unittests: Fixes unit tests for Windows (part 7)
2023-05-08 11:52:51 -07:00
Claudiu Belu
d3237b7258 unittests: Fixes unit tests for Windows (part 7)
Currently, there are some unit tests that are failing on Windows due to
various reasons:

- if a powershell command that could return an array (e.g.: Get-Disk) would return an array of
  only one element, powershell will in fact return that object directly, and **not** an array
  containing that element. In a few cases, these commands are used and their output is converted
  to json, after which they're unmarshalled in golang, with the expectation that the unmarshalled
  data to be an array. If it's not an array, we get an error.
- when mounting Block Devices, Windows expects the given source to be a Disk Number, not a path.
- for rbd_windows_test.go, we should start with Disk Number 0, which exists on all hosts.
- if a Disk has multiple volumes, Get-Volume doesn't return the volumes in the same order. This
  can result in various assertions failing.
- the pkg/volume/rbd/rdb_test.TestPlugin test expects that mounter.MountSensitive is called when
  attacher.MountDevice is called. The Windows attacher doesn't currently make that call.
2023-05-08 10:53:39 +00:00
Kubernetes Prow Robot
1f0e718585
Merge pull request #117077 from pacoxu/fsquota-cleanup
skip clear quota if FSQuotaMonitoring is disabled
2023-04-18 02:36:57 -07:00
Dmitri Fedotov
625c302505 change pv recycler scrub cmd to find -delete
PVs with large amount of files cannot be recycted with "rm" command and
are left in "Failed" state.
Hence we are switching to "find -delete" command.
2023-04-13 12:19:01 +03:00
Kubernetes Prow Robot
347480b0c6
Merge pull request #117099 from UiPath/fix-qos-limit
kubelet: fix setup of emptyDir with sizeLimit (fsquota)
2023-04-11 20:21:10 -07:00
Kubernetes Prow Robot
8722ab2c84
Merge pull request #117022 from mpatlasov/fix-dir-mismatch-for-SetVolumeOwnership
Fix directory mismatch for `volume.SetVolumeOwnership()`
2023-04-11 19:18:23 -07:00
Kubernetes Prow Robot
de109979a1
Merge pull request #116138 from cvvz/fix-114207
fix: the volume is not detached after the pod and PVC objects are deleted
2023-04-11 15:35:48 -07:00
Kubernetes Prow Robot
4893c66a48
Merge pull request #116134 from cvvz/fix-111933
fix: After a Node is down and take some time to get back to up again, the mount point of the evicted Pods cannot be cleaned up successfully.
2023-04-11 15:35:41 -07:00
Alexandru Matei
c77ad3116f kubelet: fix setup of emptyDir with sizeLimit (fsquota)
When size limit is specified subsequent invocations will fail because
ibytes is changed to -1 and stored internally in quotaSizeMap during the
first call.  Later invocation will see that the requested size doesn't
match the actual stored value and it will fail.

Signed-off-by: Alexandru Matei <alexandru.matei@uipath.com>
2023-04-07 11:07:51 +03:00
Paco Xu
79b3126f00 skip clear quota if FSQuotaMonitoring is disabled 2023-04-04 11:25:45 +08:00
Maxim Patlasov
0a37f09c32 Fix directory mismatch for volume.SetVolumeOwnership()
In most cases `dir` arg of `SetUpAt()` method of `volume.Mounter` interface is the same as `mounter.GetPath()` because we usually call `SetUpAt()` from `SetUp()` like this:"
```
func (ed *emptyDir) SetUp(mounterArgs volume.MounterArgs) error {
	return ed.SetUpAt(ed.GetPath(), mounterArgs)
}
```
(this example is from `volume/emptydir/empty_dir.go`, but there are plenty other examples like that in `volume/*`)

However, there is currently one exception. This is from `volume/projected/projected.go`:
```
	if err := wrapped.SetUpAt(dir, mounterArgs); err != nil {
		return err
	}
```
(see 96306f144a/pkg/volume/projected/projected.go (L203))

In this case `dir` is not equal to `wrapped.GetPath()` and `volume.SetVolumeOwnership()` fails when called from `SetUpAt()` of wrapped volume:
```
lstat /var/lib/kubelet/pods/a2f6e58f-7edf-4c48-a97c-ef1b8fd3caf6/volumes/kubernetes.io~empty-dir/wrapped_kube-api-access-knvkv: no such file or directory
```

To fix the issue let's pass `dir` arg to `volume.SetVolumeOwnership()` explicitly, and use it instead of `mounter.GetPath()`.
2023-04-03 12:34:37 -07:00
Kubernetes Prow Robot
f7bcff44cd
Merge pull request #116425 from jsafrane/flip-selinux
Flip SELinuxMountReadWriteOncePod to Beta
2023-03-14 16:34:41 -07:00
Kubernetes Prow Robot
e8acfc45ba
Merge pull request #116610 from xing-yang/vSphere_lock
Lock CSIMigrationvSphere feature gate for k8s 1.27
2023-03-14 15:15:05 -07:00
xing-yang
223a7c5506 Remove the unit test to enable the feature gate
vSphere CSI Migration feature gate is locked now.
2023-03-14 19:32:21 +00:00
Kubernetes Prow Robot
6a111bebe2
Merge pull request #116377 from kinvolk/rata/userns
KEP-127: user namespace support for stateless pods
2023-03-14 10:40:43 -07:00
Jan Safranek
a84dc2d5c5 Flip SELinuxMountReadWriteOncePod to Beta
And enable all e2e tests by default. They're still behind
`[Feature:SELinux]` tag to ensure the underlying OS supports SELinux.
2023-03-14 14:32:38 +01:00
杨军10092085
361e4ff0fa volume: use contextual logging 2023-03-14 08:37:30 +08:00
Rodrigo Campos
8af3cce7fe
kubelet: remove GetHostIDsForPod()
Now KEP-127 relies on idmap mounts to do the ID translation and we won't
do any chowns in the kubelet.

This patch just removes the usage of GetHostIDsForPod() in
operationexecutor to do the chown, and also removes the
GetHostIDsForPod() method from the kubelet volume interface.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2023-03-13 22:28:03 +01:00
Kubernetes Prow Robot
3106a5c553
Merge pull request #116301 from andyzhangx/remove-azuredisk-code
Remove Azure disk in-tree storage plugin
2023-03-13 10:38:48 -07:00
andyzhangx
c2b2a7622f revert azuredisk test removal change
revert

revert vendor changes

revert

revert

fix
2023-03-11 07:10:05 +00:00
Kubernetes Prow Robot
ba7f4e2fee
Merge pull request #115314 from UiPath/fix-quota-monitoring
kubelet: Fix fs quota monitoring on volumes
2023-03-09 22:42:39 -08:00
andyzhangx
5d0a54dcb5 remove Azure Disk in-tree driver code
fix
2023-03-09 13:24:08 +00:00
weizhichen
a6ffbb41f8 Squashed commit of the following:
commit 1b3ae27e7af577372d5aaaf28ea401eb33d1c4df
Author: weizhichen <weizhichen@microsoft.com>
Date:   Thu Mar 9 08:39:04 2023 +0000

    fix

commit 566e139308e3cec4c9d4765eb4ccc3a735346c2e
Author: weizhichen <weizhichen@microsoft.com>
Date:   Thu Mar 9 08:36:32 2023 +0000

    fix unit test

commit 13a58ebd25b824dcf854a132e9ac474c8296f0bf
Author: weizhichen <weizhichen@microsoft.com>
Date:   Thu Mar 2 03:32:39 2023 +0000

    add unit test

commit c984e36e37c41bbef8aec46fe3fe81ab1c6a2521
Author: weizhichen <weizhichen@microsoft.com>
Date:   Tue Feb 28 15:25:56 2023 +0000

    fix imports

commit 58ec617e0ff1fbd209ca0af3237017679c3c0ad7
Author: weizhichen <weizhichen@microsoft.com>
Date:   Tue Feb 28 15:24:21 2023 +0000

    delete CheckVolumeExistenceOperation

commit 0d8cf0caa78bdf1f1f84ce011c4cc0e0de0e8707
Author: weizhichen <weizhichen@microsoft.com>
Date:   Tue Feb 28 14:29:37 2023 +0000

    fix 111933
2023-03-09 09:53:38 +00:00
Kubernetes Prow Robot
8b413d224a
Merge pull request #116342 from msau42/unlock
Unlock CSIMigrationvSphere feature gate
2023-03-08 11:27:24 -08:00
Michelle Au
4c0ed3b52e Unlock CSIMigrationvSphere feature gate until there is a supported vSphere CSI driver available 2023-03-07 20:26:27 +00:00
torredil
6aebda9b1e Remove AWS legacy cloud provider + EBS in-tree storage plugin
Signed-off-by: torredil <torredil@amazon.com>
2023-03-06 14:01:15 +00:00
weizhichen
b0eeeacfc0 fix: the volume is not detached after the pod and PVC objects are deleted 2023-02-28 17:14:00 +00:00
Alexandru Matei
b225d6c7ac kubelet: Fix fs quota monitoring on volumes
File system quota monitoring setup fails on subsequent invocations,
each time quota setup is invoked a new random UID is generated for
each pod and compared with the previously stored UID for the folder.
Fix it by keeping track of mapping between internal uid generated
for a pod and actual external pod uid.

Signed-off-by: Alexandru Matei <alexandru.matei@uipath.com>
2023-02-27 13:00:06 +02:00
Sunny Song
98f944f55d Remove check for CSI driver running on node for CSI migration attach operations 2023-02-09 02:45:02 +00:00
Artem Minyaylov
f573e14942 Update k8s.io/utils to latest version
Update all usages of FakeExec to pointer to avoid copying the mutex
2023-02-04 11:05:22 -08:00
Kubernetes Prow Robot
58dec1fa4e
Merge pull request #112624 from pacoxu/fix-fsquota-bug
fsquota: only generate pod uuid is nil
2023-01-31 12:06:49 -08:00
Kubernetes Prow Robot
f9a3fd2810
Merge pull request #115346 from gnufied/set-staging-path-expansion
Set node_stage_path whenever available
2023-01-30 21:38:47 -08:00
Kubernetes Prow Robot
ad2a9f2f33
Merge pull request #113863 from msau42/owners
update sig-storage owners
2023-01-30 10:10:50 -08:00
Kubernetes Prow Robot
5681b0da14
Merge pull request #115338 from danwinship/nodeutil.gethostname
Move GetHostname() from k/k/pkg/util/node to k/component-helpers/node/util
2023-01-30 09:07:20 -08:00
Paco Xu
894d4b4aaf fsquota: only generate pod uuid is nil 2023-01-28 14:09:31 +08:00
Dan Winship
f994ae2521 Move GetHostname() from k/k/pkg/util/node to k/component-helpers/node/util
In fact, this actually uses pkg/util/node's GetHostname() but takes
the unit tests from cmd/kubeadm/app/util's private fork of that
function since they were more extensive. (Of course the fact that
kubeadm had a private fork of this function is a strong argument for
moving it to component-helpers.)
2023-01-27 18:24:38 -05:00
Fabio Bertinatto
b382148915 Trim out suffix added to backing file path of loopback device
When a block device, say /dev/sdc, is unexpectedly disconnected from a node,
the corresponding backing file path found at /sys/block/loop*/backing_file gets
a "(deleted)" suffix. This patch trims that suffix out, allowing the Kubelet to
unmount the volume correctly.
2023-01-27 10:53:00 -03:00
Kubernetes Prow Robot
4d9e8f7695
Merge pull request #115304 from gnufied/fix-version-skew-for-older-expansion-controller
Use expansion without recovery if allocatedResource/resizeStatus unset
2023-01-27 02:36:25 -08:00
Hemant Kumar
f052ea3ec3 Set node_stage whenever available 2023-01-26 15:27:20 -05:00
Hemant Kumar
402fe4ec9b use expansion without recovery if allocatedResource is not unset 2023-01-26 14:25:00 -05:00
Jurj Andrei George
8f6fa99b49 Skip failing Windows unit tests (volume)
As discussed during the SIG Testing meeting on January 10, 2023, failing
Windows unit tests are now skipped.
These changes should be reverted when the unit tests wil get fixed.
Mentioned SIG Testing meeting:
https://docs.google.com/document/d/1z8MQpr_jTwhmjLMUaqQyBk1EYG_Y_3D4y4YdMJ7V1Kk/edit#heading=h.qwblxf2uhgoo
2023-01-24 11:02:44 +02:00