Commit Graph

1731 Commits

Author SHA1 Message Date
Jorge Alarcon Ochoa
a069eec2bb Added cadvisor test suite to flag info message
The cadvisor test suite is not mentioned in the remote runner's
`--test-suite` flag.
This PR will mention the existence of the cadvisor test suite.
2020-05-23 19:10:32 -04:00
Kubernetes Prow Robot
4e9dd8fd36
Merge pull request #89454 from gavinfish/import-aliases
Update .import-aliases for e2e test framework
2020-03-27 14:35:54 -07:00
张潇
a6d0f8e3dc
beta.kubernetes.io/arch is already deprecated 2020-03-25 13:34:43 +08:00
drfish
dfab6b637f Update .import-aliases for e2e test framework 2020-03-25 11:40:02 +08:00
Kubernetes Prow Robot
89dfebb214
Merge pull request #89359 from gongguan/process
eviction by process number
2020-03-24 15:27:25 -07:00
louisgong
0efb70c0a2 eviction by process number 2020-03-24 09:25:04 +08:00
tanjunchen
bed22fbb44 WaitForPodReady is simply wrapper functions for e2epod package,
and they made an invalid dependency to sub e2e framework from the core framework.

So we can use e2epod.WaitTimeoutForPodReadyInNamespace to remove invalid dependency.

The main purpose of this pr is to handle the framework core package dependency subpackage pod.
2020-03-22 23:08:52 +08:00
Kubernetes Prow Robot
5708511499
Merge pull request #88708 from mikedanese/deleteopts
Migrate clientset metav1.DeleteOpts to pass-by-value
2020-03-05 23:09:23 -08:00
Kubernetes Prow Robot
50dd75f9c5
Merge pull request #88773 from vpickard/e2e-topology-manager-sriovdpReady
e2e-topology-manager: Wait for SR-IOV device plugin
2020-03-05 20:04:38 -08:00
Kubernetes Prow Robot
e23e7204f2
Merge pull request #88558 from egernst/e2e_node-PodOverhead
e2e node pod overhead
2020-03-05 20:04:11 -08:00
Mike Danese
76f8594378 more artisanal fixes
Most of these could have been refactored automatically but it wouldn't
have been uglier. The unsophisticated tooling left lots of unnecessary
struct -> pointer -> struct transitions.
2020-03-05 14:59:47 -08:00
Mike Danese
aaf855c1e6 deref all calls to metav1.NewDeleteOptions that are passed to clients.
This is gross but because NewDeleteOptions is used by various parts of
storage that still pass around pointers, the return type can't be
changed without significant refactoring within the apiserver. I think
this would be good to cleanup, but I want to minimize apiserver side
changes as much as possible in the client signature refactor.
2020-03-05 14:59:46 -08:00
Mike Danese
c58e69ec79 automated refactor 2020-03-05 14:59:46 -08:00
Kubernetes Prow Robot
1f2e1967d1
Merge pull request #88566 from Deepthidharwar/topology-mgr-numa-tests
Enable running cpu-mgr-multiNUMA e2e tests with Topology manager
2020-03-05 05:38:37 -08:00
vpickard
61565b3f6c e2e-topology-manager: Wait for SR-IOV device plugin
Make sure the SR-IOV device plugin is ready, and that
there are enough SR-IOV devices allocatable before
spinning up test pods.

Signed-off-by: vpickard <vpickard@redhat.com>
2020-03-04 10:07:35 -05:00
Deepthi Dharwar
1ede096465 Enable topology-manager-e2e tests to run on MultiNUMA nodes.
Signed-off-by: Deepthi Dharwar <ddharwar@redhat.com>
2020-03-02 22:36:43 +05:30
Deepthi Dharwar
4abbce4549 Refactor CPUMananger-e2e-tests so that it be reused by topology-manager-e2e-testsuite.
Signed-off-by: Deepthi Dharwar <ddharwar@redhat.com>
2020-03-02 22:36:31 +05:30
Deepthi Dharwar
a4b59a5d7c Currently SRIOV detection logic is reporting error if it fails to detect SRIOV device
on the system. This patch aims to fix the same.

Signed-off-by: Deepthi Dharwar <ddharwar@redhat.com>
2020-03-02 19:31:37 +05:30
Eric Ernst
aa12e1f8c4 e2e_node add test for PodOverhead feature
This test will verify that the Pod cgroup created takes Overhead into
account.

Signed-off-by: Eric Ernst <eric@amperecomputing.com>
2020-02-28 23:00:39 +00:00
Kubernetes Prow Robot
624da8b9a3
Merge pull request #88110 from fromanirh/refactor-get-current-kubelet-conf
e2e: e2e_node: refactor getCurrentKubeletConfig
2020-02-24 13:11:36 -08:00
Kubernetes Prow Robot
26f8535838
Merge pull request #88354 from jiahuif/nodee2e-stack-protector-flags
node-e2e testing: fix alias for stack protector kernel config.
2020-02-21 18:31:51 -08:00
Jiahui Feng
68b7564e7e fix alias for stack protector kernel config.
- fix YAML syntax
- alias -> aliases
- no need for CONFIG prefix
- add renamed config since 4.18
2020-02-21 11:04:48 -08:00
Kubernetes Prow Robot
57764e34d4
Merge pull request #87921 from Deepthidharwar/cpu-mgr-e2etest-NUMA-nodes
e2e test CPU-Manager: Extend CPUManager e2e tests to run on MultiNUMA node with/without HT
2020-02-20 16:29:57 -08:00
Kubernetes Prow Robot
3ae1b0ce80
Merge pull request #88234 from fromanirh/topomgr-e2e-tests-multicnt
e2e topology manager: single-numa-node multi container tests
2020-02-20 10:35:56 -08:00
Francesco Romani
64904d0ab8 e2e: topomgr: extend tests to all the policies
Per https://github.com/kubernetes/enhancements/blob/master/keps/sig-node/0035-20190130-topology-manager.md#multi-numa-systems-tests
we validate only the results for single-numa node policy,
because the is no a simple and reliable way to validate
the allocation performed by the other policies.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-20 18:22:34 +01:00
Francesco Romani
a249b93687 e2e: topomgr: address reviewer comments
Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-20 10:31:09 +01:00
Kubernetes Prow Robot
937008e3ac
Merge pull request #81226 from claudiubelu/tests/reduce-to-agnhost-part-4
tests: Replaces images used with agnhost (part 4)
2020-02-20 01:13:03 -08:00
Francesco Romani
833519f80b e2e: topomgr: properly clean up after completion
Due to an oversight, the e2e topology manager tests
were leaking a configmap and a serviceaccount.
This patch ensures a proper cleanup

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-19 17:15:42 +01:00
Francesco Romani
7c12251c7a e2e: topomgr: add multi-container tests
Add tests to check alignment of pods which contains more than one
container.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-19 17:15:42 +01:00
Francesco Romani
8e9d76f1b9 e2e: topomgr: validate all containers in pod
Up until now, the test validated the alignment of resources
only in the first container in a pod. That was just an overlook.
With this patch, we validate all the containers in a given pod.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-19 17:15:42 +01:00
Francesco Romani
ddc18eae67 e2e: topomgr: autodetect NUMA position of VF devs
Add autodetection code to figure out on which NUMA node are
the devices attached to.
This autodetection work under the assumption all the VFs in
the system must be used for the tests.
Should not this be the case, or in general to handle non-trivial
configurations, we keep the annotations mechanism added to the
SRIOV device plugin config map.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-19 17:15:42 +01:00
Francesco Romani
0c2827cb50 e2e: topomgr: remove single-numa node hack
On single-NUMA node systems the numa_node of sriov devices was
sometimes reported as "-1" instead of, say, 0. This makes some
tests that should succeed[0] fail unexpectedly.

The reporting works as expected on real multi-NUMA node systems.

This small workaround was added to handle this corner case,
but it makes overall the code less readable and a bit too lenient,
hence we remove it.

+++

[0] on a single NUMA node system some resources are obviously
always aligned if the pod can be admitted. It boils down to the
node capacity at pod admittal time.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-19 17:15:41 +01:00
Francesco Romani
bb6beb99e5 e2e: topomgr: early check to detect VFs, not PFs
The e2e_node topology_manager check have a early, quick check
to rule out systems without sriov device, thus skipping the tests.

The first version of the ckeck detected PFs, (Physical Functions),
under the assumption that VFs (Virtual Functions) were already been
created. This works because, obviously, you can't have VFs without PFs.

However, it's a little safer and easier to understand if we check
firectly for VFs, bailing out from systems which don't provide them.

Nothing changes for properly configured test systems.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-19 17:15:41 +01:00
Claudiu Belu
f7942290af tests: Replaces images used with agnhost (part 4)
Quite a few images are only used a few times in a few tests. Thus,
the images are being centralized into the agnhost image, reducing
the number of images that have to be pulled and used.

This PR replaces the usage of the following images with agnhost:

- resource-consumer-controller
- test-webserver
2020-02-18 16:29:49 -08:00
Francesco Romani
53cda47913 update bazel configuration
Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-16 10:07:12 +01:00
Kubernetes Prow Robot
4a45ae3236
Merge pull request #87645 from fromanirh/topomgr-e2e-tests
e2e-topology-manager: single-NUMA-node test
2020-02-14 08:06:19 -08:00
Kubernetes Prow Robot
4e8a7f4a4b
Merge pull request #87355 from mattjmcnaughton/mattjmcnaughton/remove-unnecessary-sudo-from-e2e
Clean up TODO around running test as sudo
2020-02-14 06:10:17 -08:00
Francesco Romani
bb770c0325 e2e: getCurrentKubeletConfig: move in subpkg
Address review comments and move the helper function
in the `framework/kubelet` package to avoid circular deps
(see https://github.com/kubernetes/kubernetes/issues/81245)

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-14 10:51:08 +01:00
Deepthi Dharwar
3342e4a09a Extend CPUManager e2e tests to run on MultiNUMA node with/without HT 2020-02-14 07:59:13 +05:30
Francesco Romani
08ba240c6b e2e: e2e_node: refactor getCurrentKubeletConfig
this patch moves the helper getCurrentKubeletConfig function,
used in both e2e and e2e_node tests and previously duplicated,
in the common framework.

There are no intended changes in behaviour.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-13 12:53:15 +01:00
Kubernetes Prow Robot
921ef35e64
Merge pull request #87949 from 928234269/non_ascii_01
Fix non-ascii characters in test/e2e_node and test/network.
2020-02-10 17:22:01 -08:00
Francesco Romani
70cce5e3f1 e2e: topomgr: introduce sriov setup/teardown funcs
Reorganize the code with setup and teardown functions,
to make room for the future addition of more device plugin
support, and to make the code a bit tidier.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-10 22:47:54 +01:00
Francesco Romani
2f0a6d2c76 e2e: topomgr: use constants for test limits
Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-10 22:47:54 +01:00
Francesco Romani
fee1dba054 e2r: topomgr: improve the test logs
Add clarification to which test is doing what, to make
the test output easier to understand.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-10 22:47:54 +01:00
Francesco Romani
83c344647f e2e: topomgr: better check for AffinityError
Add a helper function to check if a Pod failed
admission for Topology Affinity Error.
So far we only check the Status.Reason.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-10 22:47:54 +01:00
Francesco Romani
512a4e8a3e e2e: topomgr: reduce node readiness timeout
Five minutes was initially used only to be overcautious.
From my experiments, the node is ready in usually less than a minute.
Double it to give some buffer space.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-10 22:47:54 +01:00
Francesco Romani
3b4122bd03 e2e: topomgr: get and use topology hints from conf
TO properly implement some e2e tests, we need to know
some basic topology facts about the system running the tests.
The bare minimum we need to know is how many PCI SRIOV devices
are attached to which NUMA node.

This way we know which core we can reserve for kube services,
and which NUMA socket we can take to test full socket reservation.

To let the tests know the PCI device topology, we use annotations
in the SRIOV device plugin ConfigMap we need anyway.
The format is

```yaml
  metadata:
    annotations:
      pcidevice_node0: "2"
      pcidevice_node1: "0"
```

with one annotation per NUMA node in the system.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-10 22:47:53 +01:00
Francesco Romani
d9d652e867 e2e: topomgr: initial negative tests
Negative tests is when we request a gu Pod we know the system cannot
fullfill - hence we expect rejection from the topology manager.

Unfortunately, besides the trivial case of excessive cores (request
more socket than a NUMA node provides) we cannot easily test the
devices, because crafting a proper pod will require detailed knowledge
of the hw topology.

Let's consider a hypotetical two-node NUMA system with two PCIe busses,
one per NUMA node, with a SRIOV device on each bus.
A proper negative test would require two SRIOV device, that the system
can provide but not on the same single NUMA node.
Requiring for example three devices (one more than the system provides)
will lead to a different, legitimate admission error.

For these reasons we bootstrap the testing infra for the negative tests,
but we add just the simplest one.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-10 22:47:53 +01:00
Francesco Romani
ee92b4aae0 e2e: topomgr: add more positive tests
this patch builds on the topology manager e2e infrastructure to
add more positive e2e test cases.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-10 22:47:53 +01:00
Francesco Romani
1b5801a086 e2e: topomgr: add option to specify the SRIOV conf
We cannot anticipate all the possible configurations
needed by the SRIOV device plugin: there is too much variety.

Hence, we need to allow the test environment to supply
a host-specific ConfigMap to properly configure the device
plugin and avoid false negatives.

We still provide a the default config map as fallback and reference.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2020-02-10 22:47:53 +01:00