Commit Graph

2955 Commits

Author SHA1 Message Date
Kubernetes Prow Robot
f64eeb523d Merge pull request #128096 from bart0sh/PR161-e2e_node-consolidate-NFSServer-APIs
e2e_node: consolidated NFSServer APIs.
2024-11-05 00:33:35 +00:00
Abhijit Hoskeri
d86debe500 e2e_node: Pass e2eCriProxy instead of updating global.
e2eCriProxy is defined in a _test.go and referenced
in a non-test file. This confuses gopls.

It's also clearer to future readers.
2024-11-02 17:40:49 -07:00
Kubernetes Prow Robot
453efd7a4b Merge pull request #121604 from pacoxu/image-pull-e2e
[node-e2e] add test cases for serialize and parallel image pulling
2024-10-31 08:01:26 +00:00
Paco Xu
82df7a7d82 use cri proxy injector for parallel pulling image tests 2024-10-31 14:50:50 +08:00
Kubernetes Prow Robot
daef8c2419 Merge pull request #127266 from pohly/dra-admin-access-in-status
DRA API: AdminAccess in DeviceRequestAllocationResult + DRAAdminAccess feature gate
2024-10-30 03:41:25 +00:00
Kubernetes Prow Robot
5fcef4f79d Merge pull request #128422 from bart0sh/PR163-density-e2e_node-adjust-limits
density test: adjust CPU and memory limits
2024-10-30 02:37:31 +00:00
Kubernetes Prow Robot
a339a36a36 Merge pull request #127506 from ffromani/cpu-pool-size-metrics
node: metrics: add metrics about cpu pool sizes
2024-10-30 00:17:24 +00:00
Ed Bartosh
04f7a86001 density test: adjust CPU and memory limits
Adjusted limits based on recent job log:
I1028 20:05:42.079182 1002 resource_usage_test.go:199] Resource usage:
  container cpu(cores) memory_working_set(MB) memory_rss(MB)
  "kubelet" 0.024      22.17                  14.20
  "runtime" 0.041      409.70                 84.21

  I1028 20:05:42.079274 1002 resource_usage_test.go:206] CPU usage of containers:
  container 50th% 90th% 95th% 99th% 100th%
  "/"       N/A   N/A   N/A   N/A   N/A
  "runtime" 0.014 0.834 0.834 0.834 1.083
  "kubelet" 0.023 0.093 0.093 0.093 0.164

Increasing 95th percentile for runtime CPU usage should also make
pull-kubernetes-node-kubelet-containerd-flaky less flaky.
2024-10-30 00:48:56 +02:00
Patrick Ohly
f3fef01e79 DRA API: AdminAccess in DeviceRequestAllocationResult
Drivers need to know that because admin access may also grant additional
permissions. The allocator needs to ignore such results when determining which
devices are considered as allocated.

In both cases it is conceptually cleaner to not rely on the content of the
ClaimSpec.
2024-10-29 09:50:07 +01:00
Kubernetes Prow Robot
685b8b3ba1 Merge pull request #126981 from kannon92/stable-empty-dir-promotion
KEP-1967: promote size backed memory volumes to stable
2024-10-29 01:00:54 +00:00
Kubernetes Prow Robot
1d8828ce70 Merge pull request #128091 from saschagrunert/cni-plugins
Update cni-plugins to v1.6.0
2024-10-27 03:01:06 +00:00
Francesco Romani
14ec0edd10 node: metrics: add metrics about cpu pool sizes
Add metrics about the sizing of the cpu pools.
Currently the cpumanager maintains 2 cpu pools:
- shared pool: this is where all pods with non-exclusive
  cpu allocation run
- exclusive pool: this is the union of the set of exclusive
  cpus allocated to containers, if any (requires static policy in use).

By reporting the size of the pools, the users (humans or machines)
can get better insights and more feedback about how the resources
actually allocated to the workload and how the node resources are used.
2024-10-24 15:35:51 +02:00
Kubernetes Prow Robot
8c7160205d Merge pull request #127922 from PiotrProkop/topology-manager-policy-options-e2e
add e2e tests for prefer-closest-numa-nodes TopologyManagerPolicyOption
2024-10-24 14:17:03 +01:00
PiotrProkop
a6eb3281cc add e2e tests for prefer-closest-numa-nodes TopologyManagerPolicyOption suboptimal allocation
Signed-off-by: PiotrProkop <pprokop@nvidia.com>
2024-10-24 11:45:39 +02:00
Ed Bartosh
2ac5dfe379 e2e_node: check container metrics conditionally
When PodAndContainerStatsFromCRI FG is enabled, Kubelet tries to get
list of metrics from the CRI runtime using CRI API 'ListMetricDescriptors'.

As this API is not implemented in neither CRI-O nor Containerd versions
used in the test-infra, ResourceMetrics test case fails to gather
certain container metrics.

Excluding container metrics from the expected list of metrics if
PodAndContainerStatsFromCRI is enabled should solve the issue.
2024-10-23 21:08:36 +03:00
Kubernetes Prow Robot
c6669ea7d6 Merge pull request #127155 from ffromani/alignment-metrics
node: metrics: add resource alignment metrics
2024-10-23 09:54:58 +01:00
Francesco Romani
c025861e0c node: metrics: add resource alignment metrics
In order to improve the observability of the resource management
in kubelet, cpu allocation and NUMA alignment, we add more metrics
to report if resource alignment is in effect.

The more precise reporting would probably be using pod status,
but this would require more invasive and riskier changes,
and possibly extra interactions to the APIServer.

We start adding metrics to report if containers got their
compute resources aligned.
If metrics are growing, the assingment is working as expected;
If metrics stay consistent, perhaps at zero, no resource
alignment is done.

Extra fixes brought by this work
- retroactively add labels for existing tests
- running metrics test demands precision accounting to avoid flakes;
  ensure the node state is restored pristine between each test, to
  minimize the aforementioned risk of flakes.
- The test pod command line was wrong, with this the pod could not
  reach Running state. That gone unnoticed so far because
  no test using this utility function actually needed a pod
  in running state.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2024-10-23 08:05:38 +02:00
Davanum Srinivas
abbc5ad346 Copy limited pieces of code we use from runc's apparmor and utils packages
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2024-10-22 09:56:22 -04:00
Paco Xu
2bbc09b49d add e2e test for image pull serialize and parallel
- wait for pod pulled: running/failed(no restart)
2024-10-22 09:21:00 +08:00
Kubernetes Prow Robot
e8b59afec6 Merge pull request #128180 from pacoxu/node-validation
e2e_node: print system validation warnings
2024-10-18 19:09:10 +01:00
Paco Xu
6877a2bfb8 e2e_node: print system validation warnings 2024-10-18 17:31:39 +08:00
Sascha Grunert
237c7e38bd Update cni-plugins to v1.6.0
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2024-10-18 11:06:54 +02:00
Kubernetes Prow Robot
85ff7e75a2 Merge pull request #128143 from AnishShah/pod-resize-refactor
[FG:InPlacePodVerticalScaling]  Refactor in-place pod resize e2e tests
2024-10-18 08:11:04 +01:00
Kubernetes Prow Robot
1b20b087fc Merge pull request #128074 from pacoxu/fix-quota_lsci-e2e
storage fsquota monitoring pod should be user namespaced
2024-10-17 19:27:21 +01:00
Kubernetes Prow Robot
4cf9bff9eb Merge pull request #128145 from bzsuni/bz/npd/update/0.8.20
Update npd from v0.8.19 to v0.8.20
2024-10-17 17:17:27 +01:00
Kubernetes Prow Robot
c6ad6fa951 Merge pull request #125477 from my-git9/namespaceformat
Modify some error words
2024-10-17 17:17:17 +01:00
Anish Shah
b8897e688d test: refactor duplicate IPPR e22 tests.
This change refactors duplicate IPPR cluster and node e2e tests under
test/e2e/common directory
2024-10-17 05:27:27 -07:00
Anish Shah
6203006348 test: parity between cluster and node IPPR e2e tests
Some IPPR cluster e2e tests are missing from node e2e tests. This change
brings parity between them.
2024-10-17 05:23:55 -07:00
bzsuni
6d0b62a84d Update npd from v0.8.19 to v0.8.20
Signed-off-by: bzsuni <bingzhe.sun@daocloud.io>
2024-10-17 14:06:14 +08:00
Kevin Hannon
1d752200af promote size backed memory volumes to stable 2024-10-16 17:15:02 -04:00
zhifei92
2e182e736b feat: Add cri proxy for e2e_node
add example of using CRI proxy

fix:  Invalid function call

fix:  Optimize getPodImagePullDuration

fix:  Return error if the CRI Proxy is undefined

chore:  add a document
2024-10-16 20:53:28 +08:00
Ed Bartosh
b69f410f43 e2e_node: consolidated NFSServer APIs. 2024-10-15 23:30:27 +03:00
Paco Xu
386f495d41 storage fsquota monitoring pod should be user namespaced 2024-10-15 14:43:16 +08:00
Ed Bartosh
876819b8b6 e2e_node: fix mirror pod test
Modified stopNfsServer function to wait until nfs rpc is unregistered.
This should fix failing pull-kubernetes-node-arm64-ubuntu-serial-gce
job.
2024-10-15 02:05:26 +03:00
Kubernetes Prow Robot
de8f6b0db7 Merge pull request #128037 from dshebib/e2eNode_containerLifecycleContext
[e2e_node] Use shared context in regular container tests
2024-10-14 13:10:28 +01:00
Daniel Shebib
1618dbe695 Add context to tests 2024-10-12 21:23:29 -05:00
Tsubasa Nagasawa
04c6d9324e Check for restarts without being affected by container startup order
The test for checking container restarts in a Pod with restartable-init-1
and regular-1 is flaky. Right now, when we check if restartable-init-1 has
restarted, we see if it hasn’t written the "Started" log after regular-1 has
written its "Started" log.
But even though the startup sequence starts with restartable-init-1 and then
regular-1, there’s no guarantee they’ll finish starting up in that order.
Sometimes regular-1 finishes first and writes its "Started" log before restartable-init-1.

1. restartable-init-1 Starting
2. regular-1 Starting
3. regular-1 Started
4. restartable-init-1 Started

In this test, the startup order doesn’t really matter; all we need to check is
if restartable-init-1 restarted. So I changed the test to simply look for
more than one "Starting" log in restartable-init-1's logs.

There were other places that used the same helper function DoesntStartAfter,
so replaced those as well and deleted the helper function.
2024-10-12 15:17:47 +09:00
Peter Hunt
b94c5387b8 e2e_node: use restart instead of start stop
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2024-10-11 16:53:33 -04:00
Francesco Romani
cc87438f2f e2e_node: add a test to verify the kubelet starts
with systemd cgroup driver and cpumanager none policy.

This was originally planned to be a correctness check for
https://issues.k8s.io/125923, but it was difficult to reproduce the bug,
so it's now a regression test against it.

Signed-off-by: Francesco Romani <fromani@redhat.com>
Signed-off-by: Peter Hunt <pehunt@redhat.com>
2024-10-11 11:29:16 -04:00
Tsubasa Nagasawa
82b690ddf6 Add more Node E2E tests to cover pod termination for Sidecar Containers
* A pod with restartable init container that exits with
  a non-zero code is marked as a pod succeeded phase
* A pod with restartable init containers that exits with
  a non-zero code by prestop hook is marked as a pod succeeded phase
* A pod with regular container that exceeds its termination grace period
  seconds is marked as a pod failed phase
* A pod with restartable init containers that exceeds its termination
  grace period seconds is marked as a pod succeeded phase
* A pod with a regular container that exceeded its termination grace
  period seconds by PreStop hook is marked as a pod failed phase
* A pod with restartable init containers that exceeds its termination
  grace period seconds by PreStop hook is marked as a pod succeeded phase

Signed-off-by: Tsubasa Nagasawa <toversus2357@gmail.com>
2024-10-10 09:43:41 +09:00
Tsubasa Nagasawa
bd00f83578 Add step to existing pod termination Node E2E tests to check the container’s exit code
Signed-off-by: Tsubasa Nagasawa <toversus2357@gmail.com>
2024-10-10 09:17:43 +09:00
Kubernetes Prow Robot
364c73d5a9 Merge pull request #127637 from dshebib/e2eNode_containersLifecycleFormatting
[e2e_node] containers_lifecycle organize tests
2024-10-09 19:38:22 +01:00
PiotrProkop
9bc3a2ff5a add e2e tests for prefer-closest-numa-nodes TopologyManagerPolicyOption
Signed-off-by: PiotrProkop <pprokop@nvidia.com>
2024-10-08 14:32:22 +02:00
Daniel Shebib
2d28e6803c typo 2024-10-06 07:40:56 -05:00
Daniel Shebib
7155404eb5 format whitespace 2024-10-05 18:46:26 -05:00
Daniel Shebib
252fb59bf9 Encase tests in When() 2024-10-05 18:46:26 -05:00
Anish Shah
91b70a9f19 fix InodeEvictionTest 2024-10-04 22:49:14 +00:00
Anish Shah
a37101a202 gofmt fix 2024-10-04 19:47:21 +00:00
Anish Shah
9af732a349 added a comment to explain the usage of emptyDir volume in eviction test #127864 2024-10-04 18:38:40 +00:00
Anish Shah
7abfa2dafb possible deflake 2024-10-03 16:00:48 +00:00