Commit Graph

759 Commits

Author SHA1 Message Date
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
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
Paco Xu
894d4b4aaf fsquota: only generate pod uuid is nil 2023-01-28 14:09:31 +08: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
HirazawaUi
79b799a0f3 delete unused functions in pkg/volume directory 2023-01-16 21:19:11 +08:00
Kubernetes Prow Robot
cf272cf2c6
Merge pull request #110931 from claudiubelu/adds-unittests-3
tests: Ports volume unit tests to Windows
2023-01-05 05:31:58 -08:00
Claudiu Belu
96e99f564a tests: Ports volume unit tests to Windows (part 2)
Ports the metrics_du unit tests to Windows.
Ports the hostutil unit tests to Windows.
2023-01-01 00:18:31 +00:00
Kubernetes Prow Robot
685d639cb5
Merge pull request #114464 from Nordix/issue-114461
Set permissions for timestamp directory before publishing update to avoid permission denied
2022-12-24 16:11:26 -08:00
Tero Saarni
96306f144a Set permissions on volume before publishing update
This change fixes a race condition that was caused by setting the file owner,
group and mode non-atomically, after the updated files had been published.

Users who were running non-root containers, without GID 0 permissions, and
had removed read permissions from other users by setting defaultMode: 0440 or
similar, were getting intermittent permission denied errors when accessing
files on secret or configmap volumes or service account tokens on projected
volumes during update.
2022-12-24 07:59:41 +02:00
Kubernetes Prow Robot
94fd106a17
Merge pull request #110453 from claudiubelu/unittests-4
unittests: Fixes unit tests for Windows (part 4)
2022-12-16 06:16:16 -08:00
Claudiu Belu
4dc7a260ec unittests: Fixes unit tests for Windows (part 4)
Currently, there are some unit tests that are failing on Windows due to
various reasons:

- paths not properly joined (filepath.Join should be used).
- files not closed, which means that they cannot be removed / renamed.
- time.Now() is not as precise on Windows, which means that 2
  consecutive calls may return the same timestamp.
2022-11-29 16:32:26 +00:00
Yibo Zhuang
380c7f248e scheduler volumebinding: leverage PreFilterResult
This change will leverage the new PreFilterResult
to reduce down the list of eligible nodes for pod
using Bound Local PVs during PreFilter stage so
that only the node(s) which local PV node affinity
matches will be cosnidered in subsequent scheduling
stages.

Today, the NodeAffinity check is done during Filter
which means all nodes will be considered even though
there may be a large number of nodes that are not
eligible due to not matching the pod's bound local
PV(s)' node affinity requirement. Here we can
reduce down the node list in PreFilter to ensure that
during Filter we are only considering the reduced
list and thus can provide a more clear message to
users when node(s) are not available for scheduling
since the list only contains relevant nodes.

If error is encountered (e.g. PV cache read error) or
if node list reduction cannot be done (e.g. pod uses
no local PVs), then we will still proceed to consider
all nodes for the rest of scheduling stages.

Signed-off-by: Yibo Zhuang <yibzhuang@gmail.com>
2022-11-17 21:37:24 -08:00
Michelle Au
524a8b32a6 add sig-storage reviewers, remove inactive sig-storage reviewers, remove redundant owners files 2022-11-15 23:51:57 +00:00
Jan Safranek
5b284a50b7 Revert "Remove references to openstack and cinder"
This reverts commit 9bbf01bae9.
2022-11-10 18:25:30 +01:00
Jan Safranek
e575e60ea4 Reconstruct SELinux mount option
When reconstructing volumes from disk after kubelet restart, reconstruct
also context=XYZ mount option and add it to the ActualStateOfWorld.
2022-11-08 11:17:38 +01:00
Jan Safranek
fc245b339b Refactor ConstructVolumeSpec
Return a struct from ConstructVolumeSpec to be able to add more fields to
it later.
2022-11-03 16:55:13 +01:00
Kubernetes Prow Robot
4c657e5014
Merge pull request #110403 from claudiubelu/unittests-3
unittests: Fixes unit tests for Windows (part 3)
2022-10-31 15:52:44 -07:00
Kubernetes Prow Robot
38c659eb9f
Merge pull request #111534 from claudiubelu/unittests-7
unittests: Fixes unit tests for Windows
2022-10-24 06:30:25 -07:00
Claudiu Belu
9f95b7b18c unittests: Fixes unit tests for Windows (part 3)
Currently, there are some unit tests that are failing on Windows due to
various reasons:

- paths not properly joined (filepath.Join should be used).
- Proxy Mode IPVS not supported on Windows.
- DeadlineExceeded can occur when trying to read data from an UDP
  socket. This can be used to detect whether the port was closed or not.
- In Windows, with long file name support enabled, file names can have
  up to 32,767 characters. In this case, the error
  windows.ERROR_FILENAME_EXCED_RANGE will be encountered instead.
- files not closed, which means that they cannot be removed / renamed.
- time.Now() is not as precise on Windows, which means that 2
  consecutive calls may return the same timestamp.
- path.Base() will return the same path. filepath.Base() should be used
  instead.
- path.Join() will always join the paths with a / instead of the OS
  specific separator. filepath.Join() should be used instead.
2022-10-21 19:25:48 +03:00
danishprakash
f10f4d372c
pv_controller: update tests for multiple storageclasses
Signed-off-by: danishprakash <grafitykoncept@gmail.com>
2022-10-19 09:33:44 +05:30
danishprakash
f12325add3
pkg/admission/storageclass: pick random storageclass if >1 present
Signed-off-by: danishprakash <grafitykoncept@gmail.com>
2022-10-19 09:30:48 +05:30
Kubernetes Prow Robot
b6d89e756a
Merge pull request #112571 from claudiubelu/fix-nested-mountpoints
Fixes getNestedMountpoints grouping
2022-10-18 18:57:11 -07:00
Claudiu Belu
6e9f428547 Fixes getNestedMountpoints grouping
Currently, getNestedMountpoints sorts using sort.Strings, which would
sort the following strings in this exact order:

/dir/nested, /dir/nested-vol, /dir/nested.vol, /dir/nested/double, /dir/nested2

Because of this, "nested/double" is returned as well, even though it shouldn't
have been. This issue is worse on Windows, where the path separator is typically
the backslash.

This commit addresses this issue by checking if a nested mount point has been
previously seen or not.
2022-10-18 15:19:17 +03:00
Matthew Cary
3993c23a74 Make mount ref search more robust
Change-Id: Id28c2d1c8e996c10e4ad19a993ebbe75b142c1af
2022-09-20 17:57:39 -07:00
Humble Chirammal
f22a74aa6a various corrections in pkg/volume
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-09-16 16:42:06 +05:30
Akanksha Kumari
86fa479273 Call SetupDevice only if Volume is not globally Mounted 2022-09-12 23:00:00 +05:30
Claudiu Belu
49ef27009d unittests: Fixes unit tests for Windows
Currently, there are some unit tests that are failing on Windows due to
various reasons:

- Windows file permissions do not work the same way as the Linux ones.
- cp does not exist on Windows, and xcopy should be used instead.
- Get-Item does not work for hidden files / folders like AppData, but
  works if given the -Force flag.
2022-08-26 14:39:56 +03:00
ZhangKe10140699
593f6c9fcc fix nestedPendingOperations mount and umount parallel bug 2022-08-26 09:29:17 +08:00
Kubernetes Prow Robot
69136c0c81
Merge pull request #111894 from wongma7/pvcnpd
Fix PVC nil pointer dereference during migration-enabled volume expand
2022-08-23 20:08:37 -07:00
Kubernetes Prow Robot
07bca2d791
Merge pull request #67782 from dims/yank-in-tree-openstack-cloud-provider
Remove in-tree openstack cloud provider
2022-08-23 18:59:48 -07:00
Kubernetes Prow Robot
71e534c580
Merge pull request #111527 from mengjiao-liu/clean-prometheus-in-volume
Cleanup: remove prometheus dependencies for volume
2022-08-23 16:05:31 -07:00
Davanum Srinivas
9bbf01bae9
Remove references to openstack and cinder
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-08-22 16:43:14 -04:00
Matthew Wong
a322a708f3 Fix PVC nil pointer dereference during migration-enabled volume expand 2022-08-17 11:32:22 -07:00
Kubernetes Prow Robot
64ed914545
Merge pull request #111258 from dobsonj/kep-596-ga-feature-flag
KEP-596: Move CSIInlineVolume feature to GA
2022-08-05 13:54:30 -07:00
Kubernetes Prow Robot
11d4cb52f2
Merge pull request #111693 from kinvolk/rata/userns-support-2022
volume: FeatureGate access to GetHostIDsForPod()
2022-08-05 09:37:48 -07:00
Jonathan Dobson
5f774832a5 Move CSIInlineVolume feature to GA 2022-08-04 13:06:30 -06:00
Rodrigo Campos
4267f2ee0c volume: FeatureGate access to GetHostIDsForPod()
After the userns PR got merged:
	https://github.com/kubernetes/kubernetes/pull/111090

gnufied decided it might be safer if we feature gate this part of the
code, due to the kubelet volume host type assertion.

That is a great catch and this patch just moves the code inside the
feature gate if.

Signed-off-by: Rodrigo Campos <rodrigoca@microsoft.com>
2022-08-04 14:08:29 +02:00
Jan Safranek
f9c7ce5b9c Add unit tests for DesiredStateOfWorldPopulator 2022-08-04 10:51:59 +02:00
Jan Safranek
39f0d78714 Add unit tests for GetPodVolumeNames 2022-08-04 10:51:57 +02:00
Jan Safranek
a01e720a1a Rename IsRWOP
To be able to update content of the function to other access modes when we
implement SELinux mount for more of them.
2022-08-04 10:51:54 +02:00
Jan Safranek
17d850ee0e Add interface for SELinuxOptionsToFileLabel
github.com/opencontainers/selinux/go-selinux needs OS that supports SELinux
and SELinux enabled in it to return useful data, therefore add an interface
in front of it, so we can mock its behavior in unit tests.
2022-08-04 10:51:51 +02:00
Jan Safranek
de7f5b66ed Fix existing unit tests 2022-08-04 10:51:44 +02:00
Jan Safranek
48b0751269 Add SELinux context tracking to volume manager
Both ActualStateOfWorld and DesiredStateOfWorld must track SELinux context
of volume mounts.
2022-08-04 10:51:41 +02:00
Jan Safranek
4cfb277e8b Implement mounting with -o context= in iSCSI volume plugin 2022-08-04 10:51:31 +02:00