Commit Graph

135100 Commits

Author SHA1 Message Date
Ed Bartosh
3b4e56e09c kubelet: DRA: plugin: set logging prefix 2026-01-27 18:09:16 +02:00
Ed Bartosh
1c913f6e9c kubelet: DRA: manager: set logging prefix 2026-01-27 18:09:11 +02:00
Ed Bartosh
2f82dc6dce kubelet: DRA: claiminfo: improve logging
- got rid of embedding logger into a struct
- added logging prefix
2026-01-26 17:43:38 +02:00
Ed Bartosh
acff01fe8b kubelet: DRA: healthinfo: set logging prefix 2026-01-26 17:43:38 +02:00
Ed Bartosh
7933d90815 kubelet/dra: get rid of Background calls
Removed almost all remaining context.Background and klog.Background
calls, pass context or logger instead.
2026-01-26 17:43:38 +02:00
Kubernetes Prow Robot
3d544b9142 Merge pull request #136474 from ShaanveerS/netpol-revive-135706
Netpol: reduce e2e pod churn with agnhost porter
2026-01-26 20:59:59 +05:30
Kubernetes Prow Robot
53b29a3a2c Merge pull request #136269 from pohly/dra-scheduler-double-allocation-fixes
DRA scheduler: double allocation fixes
2026-01-26 20:59:50 +05:30
Patrick Ohly
001ec49eb6 DRA integration: more pods per node, more parallelism
Long running tests like TestDRA/all/DeviceBindingConditions (42.50s)
should run in parallel with other tests, otherwise the overall runtime is too
high.

This then must allow more pods per node to avoid blocking scheduling.
2026-01-26 15:44:49 +01:00
Patrick Ohly
2198d96520 DRA integration: add "uses all resources" test
This corresponds to an E2E test which sometimes (but very rarely) flaked in the
CI.
2026-01-26 15:44:48 +01:00
Patrick Ohly
581ee0a2ec DRA scheduler: fix another root cause of double device allocation
GatherAllocatedState and ListAllAllocatedDevices need to collect information
from different sources (allocated devices, in-flight claims), potentially even
multiple times (GatherAllocatedState first gets allocated devices, then the
capacities).

The underlying assumption that nothing bad happens in parallel is not always
true. The following log snippet shows how an update of the assume
cache (feeding the allocated devices tracker) and in-flight claims lands such
that GatherAllocatedState doesn't see the device in that claim as allocated:

    dra_manager.go:263: I0115 15:11:04.407714      18778] scheduler: Starting GatherAllocatedState
    ...
    allocateddevices.go:189: I0115 15:11:04.407945      18066] scheduler: Observed device allocation device="testdra-all-usesallresources-hvs5d.driver/worker-5/worker-5-device-094" claim="testdra-all-usesallresources-hvs5d/claim-0553"
    dynamicresources.go:1150: I0115 15:11:04.407981      89109] scheduler: Claim stored in assume cache pod="testdra-all-usesallresources-hvs5d/my-pod-0553" claim="testdra-all-usesallresources-hvs5d/claim-0553" uid=<types.UID>: a84d3c4d-f752-4cfd-8993-f4ce58643685 resourceVersion="5680"
    dra_manager.go:201: I0115 15:11:04.408008      89109] scheduler: Removed in-flight claim claim="testdra-all-usesallresources-hvs5d/claim-0553" uid=<types.UID>: a84d3c4d-f752-4cfd-8993-f4ce58643685 version="1211"
    dynamicresources.go:1157: I0115 15:11:04.408044      89109] scheduler: Removed claim from in-flight claims pod="testdra-all-usesallresources-hvs5d/my-pod-0553" claim="testdra-all-usesallresources-hvs5d/claim-0553" uid=<types.UID>: a84d3c4d-f752-4cfd-8993-f4ce58643685 resourceVersion="5680" allocation=<
        	{
        	  "devices": {
        	    "results": [
        	      {
        	        "request": "req-1",
        	        "driver": "testdra-all-usesallresources-hvs5d.driver",
        	        "pool": "worker-5",
        	        "device": "worker-5-device-094"
        	      }
        	    ]
        	  },
        	  "nodeSelector": {
        	    "nodeSelectorTerms": [
        	      {
        	        "matchFields": [
        	          {
        	            "key": "metadata.name",
        	            "operator": "In",
        	            "values": [
        	              "worker-5"
        	            ]
        	          }
        	        ]
        	      }
        	    ]
        	  },
        	  "allocationTimestamp": "2026-01-15T14:11:04Z"
        	}
         >
    dra_manager.go:280: I0115 15:11:04.408085      18778] scheduler: Device is in flight for allocation device="testdra-all-usesallresources-hvs5d.driver/worker-5/worker-5-device-095" claim="testdra-all-usesallresources-hvs5d/claim-0086"
    dra_manager.go:280: I0115 15:11:04.408137      18778] scheduler: Device is in flight for allocation device="testdra-all-usesallresources-hvs5d.driver/worker-5/worker-5-device-096" claim="testdra-all-usesallresources-hvs5d/claim-0165"
    default_binder.go:69: I0115 15:11:04.408175      89109] scheduler: Attempting to bind pod to node pod="testdra-all-usesallresources-hvs5d/my-pod-0553" node="worker-5"
    dra_manager.go:265: I0115 15:11:04.408264      18778] scheduler: Finished GatherAllocatedState allocatedDevices=<map[string]interface {} | len:2>: {

Initial state: "worker-5-device-094" is in-flight, not in cache
- goroutine #1: starts GatherAllocatedState, copies cache
- goroutine #2: adds to assume cache, removes from in-flight
- goroutine #1: checks in-flight

=> device never seen as allocated

This is the second reason for double allocation of the same device in two
different claims. The other was timing in the assume cache. Both were
tracked down with an integration test (separate commit). It did not fail
all the time, but enough that regressions should show up as flakes.
2026-01-26 15:44:48 +01:00
Kubernetes Prow Robot
584add12b6 Merge pull request #136457 from tosi3k/workload-helper
Extract helper methods from gang scheduling plugin
2026-01-26 20:01:51 +05:30
Kubernetes Prow Robot
437184c055 Merge pull request #136292 from atombrella/feature/modernize_plusbuild
Remove obsolete `// +build` instruction.
2026-01-26 19:05:59 +05:30
Kubernetes Prow Robot
ac2ce676c1 Merge pull request #136249 from Yuvraj02/qos-cgroup-cpu-shares-test
kubelet: add unit tests for QoS CPU shares update
2026-01-26 19:05:51 +05:30
Antoni Zawodny
8b39544d60 Extract helper methods from gang scheduling plugin 2026-01-26 13:45:26 +01:00
Kubernetes Prow Robot
e0cd8e3897 Merge pull request #136529 from dims/fix-kube-proxy-conntrack-test
test: Read /proc/net/nf_conntrack instead of using conntrack binary
2026-01-26 17:35:52 +05:30
Davanum Srinivas
7f2c4535c3 test: Read /proc/net/nf_conntrack instead of using conntrack binary
The distroless-iptables image no longer includes the conntrack binary
as of v0.8.7 (removed in kubernetes/release#4223 since kube-proxy no
longer needs it after kubernetes#126847).

Update the KubeProxy CLOSE_WAIT timeout test to read /proc/net/nf_conntrack
directly instead of using the conntrack command. The file contains the
same connection tracking data and is accessible from the privileged
host-network pod.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-01-26 07:42:07 +00:00
Kubernetes Prow Robot
f4eedc41b8 Merge pull request #136518 from atombrella/feature/modernize_forvar
Remove redundant re-assignments in for-loops under tests
2026-01-26 12:25:08 +05:30
Mads Jensen
757647786d Remove redundant re-assignments in for-loops in test/{e2e,integration,utils}
The modernize forvar rule was applied. There are more details in this blog
post: https://go.dev/blog/loopvar-preview
2026-01-25 22:58:27 +01:00
Yuvraj
9b05946801 kubelet: add unit tests for QoS CPU shares update
Signed-off-by: Yuvraj <yuvrajsinghbhadoria@gmail.com>
2026-01-25 13:20:07 +05:30
Dan Winship
325c346659 Use a single container in all Netpol test pods
"agnhost porter" can listen on multiple ports, so there's no need to
run multiple containers.

Co-authored-by: ShaanveerS <shaanver.singh@gmail.com>
2026-01-25 08:13:43 +01:00
MohammedSaalif
4925c6bea4 DRA: support non-pod references in ReservedFor (#136450)
* DRA: support non-pod references in ReservedFor

Signed-off-by: MohammedSaalif <salifud2004@gmail.com>

* Expand reservation validation comment in syncClaim as suggested by mortent

* Address feedback: rename valid to remaining and remove obsolete TODO

---------

Signed-off-by: MohammedSaalif <salifud2004@gmail.com>
2026-01-25 00:28:13 +05:30
Darshan Murthy
b4947a5891 feat(storage): enable validation-gen + DV wiring for storage.k8s.io (#135438)
* Enable DV coverage for VolumeAttachmentSpec.Attacher validation

update code-gen

* addressing PR comments
2026-01-24 14:29:26 +05:30
Kubernetes Prow Robot
af5dd4492e Merge pull request #136484 from dims/fix-container-restart-test-aftereach
Fix container_restart_test AfterEach failing when CRI Proxy is undefined
2026-01-24 12:19:26 +05:30
Kubernetes Prow Robot
4bfdd672b5 Merge pull request #136442 from borg-land/drop-ipc-utils-image-one
add util-linux to agnhost so we can replace ipc-utils with agnhost
2026-01-24 10:33:55 +05:30
Kubernetes Prow Robot
4d59060ba2 Merge pull request #136052 from sreeram-venkitesh/added-missing-tests-for-client-go-metrics
Added missing tests for client-go metrics
2026-01-24 10:33:47 +05:30
Kubernetes Prow Robot
7cdeb11327 Merge pull request #135800 from danwinship/nftables-hairpin
rework nftables masquerading code, part 1
2026-01-24 10:33:39 +05:30
Kubernetes Prow Robot
5eb7087ccb Merge pull request #135761 from darshansreenivas/admissionregistratio_k8s_io_policy_name
feat: wire admissionregistration group for declarative validation and +k8s:required to ValidatingAdmissionPolicyBindingSpec.PolicyName
2026-01-24 10:33:31 +05:30
Kubernetes Prow Robot
4116b65ac5 Merge pull request #135694 from saschagrunert/update-cri-tools-v1.35.0
Update cri-tools to v1.35.0
2026-01-24 09:01:26 +05:30
Kubernetes Prow Robot
56583f4464 Merge pull request #136444 from borg-land/drop-arm-from-e2e-test-images
drop armv7 from our e2e test images
2026-01-24 07:39:35 +05:30
Kubernetes Prow Robot
0c127dd954 Merge pull request #135291 from xuzhenglun/fix-ut
fix case title in kubelet/server unit
2026-01-24 07:39:28 +05:30
Kubernetes Prow Robot
01cc26fba3 Merge pull request #136379 from amigo-nishant/master
cleanup: improve darwin error messages
2026-01-24 06:43:27 +05:30
Davanum Srinivas
03e6622c92 Fix container_restart_test AfterEach failing when CRI Proxy is undefined
Two test contexts were failing because their AfterEach blocks run even
when BeforeEach skips the test (standard Ginkgo behavior). This caused
resetCRIProxyInjector to fail with "CRI Proxy is undefined".

Switched to using DeferCleanup inside BeforeEach instead, which only
runs if BeforeEach succeeds. This is the same pattern the other test
contexts in this file already use.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-01-23 19:59:22 -05:00
Kubernetes Prow Robot
c7416f744e Merge pull request #136486 from dims/fix-imagepulltest-timeout
Add timeout to ImagePullTest poll loop to prevent infinite hangs
2026-01-24 05:51:27 +05:30
Davanum Srinivas
48f67b9656 Add timeout to ImagePullTest poll loop to prevent infinite hangs
ImagePullTest was using wait.PollUntilContextCancel which has no
timeout, causing tests to hang for hours when the expected container
state is never reached (e.g., ErrImageNeverPull).

Changed to wait.PollUntilContextTimeout with ContainerStatusRetryTimeout
(5 minutes), matching the pattern used by other tests in the same file.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-01-23 18:19:17 -05:00
Kubernetes Prow Robot
6b092968ac Merge pull request #136166 from ngopalak-redhat/ngopalak/sub-dir-walk
Add test and doc for processing all the sub-directories in kubelet drop-in folder
2026-01-24 00:29:30 +05:30
Kubernetes Prow Robot
62cbba593b Merge pull request #136413 from hoteye/migrate-kubelet-getnode-context
kubelet: migrate kubelet_getters.go to contextual logging
2026-01-23 23:35:37 +05:30
Kubernetes Prow Robot
4c221cdc56 Merge pull request #133335 from bart0sh/PR190-pluginmanager-fix-handling-registration-failures
pluginmanager: fix handling registration failures
2026-01-23 23:35:29 +05:30
upodroid
111c4cfb9f add util-linux-misc to agnhost so we can replace ipc-utils with agnhost 2026-01-23 20:19:46 +03:00
Neeraj Krishna Gopalakrishna
001dcf63ba Add test and doc for processing all the sub-directories in drop-in folder 2026-01-23 21:58:31 +05:30
Kubernetes Prow Robot
a90cf50004 Merge pull request #136443 from dims/bump-e2e-test-images
Bump e2e test images to latest promoted versions
2026-01-23 18:57:38 +05:30
Kubernetes Prow Robot
a46ff14f97 Merge pull request #136089 from ngopalak-redhat/ngopalak/config-dir
Improve logging, doc and test for kubelet config-dir file extension
2026-01-23 18:57:31 +05:30
Mahamed Ali
00238edfdd drop armv7 from our e2e test images 2026-01-23 12:20:32 +00:00
Kubernetes Prow Robot
0af247eb14 Merge pull request #136344 from brejman/kep-5732-tas-rename-podgroupinfo
Rename PodGroupInfo in preparation for Workload-aware scheduling changes
2026-01-23 17:37:29 +05:30
hoteye
e649292782 kubelet: migrate kubelet_getters.go to contextual logging. Migrate GetNode and related functions to use contextual logging 2026-01-23 19:54:43 +08:00
Davanum Srinivas
bceadbece2 Bump e2e test images to latest promoted versions
Image updates:
- ipc-utils: 1.3 → 1.4
- kitten: 1.7 → 1.8
- nautilus: 1.7 → 1.8
- nginx: 1.14-4 → 1.15-4
- nginx (new): 1.15-4 → 1.27-0
- node-perf/npb-ep: 1.2 → 1.6.0
- node-perf/npb-is: 1.2 → 1.7.0
- nonewprivs: 1.3 → 1.4
- nonroot: 1.4 → 1.5
- resource-consumer: 1.13 → 1.14
- volume/nfs: 1.4 → 1.6.0
- volume/iscsi: 2.6 → 2.7

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-01-23 06:19:30 -05:00
amigo-nishant
b56c322f24 cleanup: improve darwin error messages 2026-01-23 09:30:07 +05:30
Kubernetes Prow Robot
c2618d48c0 Merge pull request #136445 from dims/fix-volume-nfs-centos-stream9
Fix volume/nfs image for CentOS Stream 9
2026-01-23 09:25:25 +05:30
Davanum Srinivas
e8d1e3563b Fix volume/nfs image for CentOS Stream 9
The volume/nfs:1.5 image was updated from CentOS 8 to CentOS Stream 9
in commit 9b47a096f4, but this broke NFS server startup because
NFSv2 is no longer supported in RHEL 9 / CentOS Stream 9.

The `-N 2` flag (disable NFSv2) passed to rpc.mountd and rpc.nfsd
causes them to fail with "2: Unsupported version" since there's no
NFSv2 to disable. This prevented rpc.nfsd from starting, causing
NFS mount timeouts in e2e tests.

Fix by removing the `-N 2` flags. NFSv2 is already unavailable in
CentOS Stream 9, so explicitly disabling it is unnecessary.

Red Hat documentation states: "NFS version 2 (NFSv2) is no longer
supported by Red Hat."

Reference: https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/9/html/managing_file_systems/mounting-nfs-shares_managing-file-systems

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2026-01-22 21:13:15 -05:00
Kubernetes Prow Robot
5f4adaf579 Merge pull request #136303 from ShaanveerS/fix-flake
scheduler: deflake TestUnReservePreBindPlugins
2026-01-23 05:17:27 +05:30
Kubernetes Prow Robot
3863ed83f1 Merge pull request #136429 from dims/fix-npb-is-ppc64le
Remove ppc64le and s390x support from npb-is image
2026-01-23 03:03:35 +05:30