Commit Graph

22 Commits

Author SHA1 Message Date
Kenichi Omichi
12c0eaef25 Use ExpectNoError(err)
We missed another pattern to check error doesn't happen on e2e tests.
This covers the pattern for consistent test implementation.
2020-09-03 23:29:07 +00:00
Artyom Lukianov
a4b367a6a3 Refactor and add new tests to hugepages e2e tests
Add tests to cover usage of multiple hugepages with different
page sizes under the same pod.

Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2020-06-08 11:23:54 +03:00
Kubernetes Prow Robot
8ce1b535ee
Merge pull request #80831 from odinuge/hugetlb-pagesizes-cleanup
Add support for removing unsupported huge page sizes
2020-06-04 23:41:43 -07:00
Giuseppe Scrivano
43c56eb403
e2e_node: adapt tests to cgroup v2
and fix node_container_manager_test to run with the systemd cgroup
manager.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2020-04-09 16:18:05 +02:00
Odin Ugedal
2830827442
Add support for removing unsupported huge page sizes
When kubelet is restarted, it will now remove the resources for huge
page sizes no longer supported. This is required when:
- node disables huge pages
- changing the default huge page size in older versions of linux
(because it will then only support the newly set default).
- Software updates that change what sizes are supported (eg. by changing
boot parameters).
2020-03-19 13:08:08 +01:00
Mike Danese
3aa59f7f30 generated: run refactor 2020-02-07 18:16:47 -08:00
tanjunchen
7ff3a1f8db test/e2e/framework: remove skip.go and use e2eskipper subpackage 2020-02-01 01:18:48 +08:00
SataQiu
d2bdf89a8b fix golint issues in test/e2e_node 2019-11-26 16:26:55 +08:00
Odin Ugedal
b1308ed70a
Compact memory before requesting huge pages
Compact memory to make bigger contiguous blocks of memory available
before allocating huge pages.

https://www.kernel.org/doc/Documentation/sysctl/vm.txt
2019-09-17 17:04:01 +02:00
carlory
d1290ffdef clean up test code 2019-09-05 23:44:19 +08:00
Odin Ugedal
7df6a84902
Fix flaky hugepages tests by decreasing page count
If requesting an substantial amount of huge page memory
(like the tests), it is recommended to to it as early
after boot as possible, or by using the kernel cmd line.
2019-08-21 17:59:56 +02:00
SataQiu
641d330f89 e2e_node: clean up non-recommended import 2019-07-28 12:49:36 +08:00
Odin Ugedal
1c79157065 Remove use of HugePages feature flag in test
The flag was removed in 1.14, and huge pages are now enabled by
default.
2019-07-08 17:05:05 +02:00
Aaron Crickenberger
b8d0ce4019 add import-alias for k8s.io/api/core/v1 2019-06-20 11:40:15 -07:00
Odin Ugedal
6bb8bb0227
Cleanup e2e_node test style
Remove the use of  Except(err).NotTo(HaveOccured()), and switch to using
framework ramework.ExpectNoError(err)
2019-06-14 17:51:48 +02:00
Jorge Alarcon Ochoa
4969a05327 Refactored pod-related functions from framework/util.go
This a refactoring of framework/utils.go into framework/pod.

Signed-off-by: Jorge Alarcon Ochoa <alarcj137@gmail.com>
2019-05-30 09:30:26 -04:00
SataQiu
d3a902ff5b e2e refactor: cleanup Logf form framework/util 2019-05-24 16:39:46 +08:00
Lucas Käldström
7a840cb4c8
automated: Rename all package references 2018-08-29 19:07:52 +03:00
Davanum Srinivas
789800d298
Remove ARCH specific image consideration from e2e tests
All e2e test images are now using multi-arch manifests so we should stop
looking up and using images that are specific to runtime.GOARCH

Change-Id: I5f3fd6e9a42b9fb88891c19e28a2dfcf7a14be82
2018-08-09 13:40:19 -04:00
Yu-Ju Hong
7cbd897e3e test/e2e_node: Add Node-exclusive feature tags to existing tests 2018-05-21 17:52:36 -07:00
Filipe Brandenburger
b230fb8ac4 Use a []string for CgroupName, which is a more accurate internal representation
The slice of strings more precisely captures the hierarchic nature of
the cgroup paths we use to represent pods and their groupings.

It also ensures we're reducing the chances of passing an incorrect path
format to a cgroup driver that requires a different path naming, since
now explicit conversions are always needed.

The new constructor NewCgroupName starts from an existing CgroupName,
which enforces a hierarchy where a root is always needed. It also
performs checking on the component names to ensure invalid characters
("/" and "_") are not in use.

A RootCgroupName for the top of the cgroup hierarchy tree is introduced.

This refactor results in a net reduction of around 30 lines of code,
mainly with the demise of ConvertCgroupNameToSystemd which had fairly
complicated logic in it and was doing just too many things.

There's a small TODO in a helper updateSystemdCgroupInfo that was
introduced to make this commit possible. That logic really belongs in
libcontainer, I'm planning to send a PR there to include it there.
(The API already takes a field with that information, only that field is
only processed in cgroupfs and not systemd driver, we should fix that.)

Tested by running the e2e-node tests on both Ubuntu 16.04 (with cgroupfs
driver) and CentOS 7 (with systemd driver.)
2018-05-01 08:29:06 -07:00
Derek Carr
6e0a52e7ff Add node e2e to verify hugepages feature 2018-02-08 10:37:04 -05:00