Commit Graph

141 Commits

Author SHA1 Message Date
Davanum Srinivas
a889cc7f79
prevent initializing the same flag more than once
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-03-13 17:07:00 -04:00
Davanum Srinivas
be42dcfd73
re-organize remote e2e test to be pluggable
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2023-03-13 12:33:47 -04:00
Todd Neal
23f71f0eba refactor remote test running 2023-03-12 21:26:01 -05:00
David Porter
c5a1f0188b
test: Add node e2e test to verify static pod termination
Add node e2e test to verify that static pods can be started after a
previous static pod with the same config temporarily failed termination.

The scenario is:

1. Static pod is started
2. Static pod is deleted
3. Static pod termination fails (internally `syncTerminatedPod` fails)
4. At later time, pod termination should succeed
5. New static pod with the same config is (re)-added
6. New static pod is expected to start successfully

To repro this scenario, setup a pod using a NFS mount. The NFS server is
stopped which will result in volumes failing to unmount and
`syncTerminatedPod` to fail. The NFS server is later started, allowing
the volume to unmount successfully.

xref:

1. https://github.com/kubernetes/kubernetes/pull/113145#issuecomment-1289587988
2. https://github.com/kubernetes/kubernetes/pull/113065
3. https://github.com/kubernetes/kubernetes/pull/113093

Signed-off-by: David Porter <david@porter.me>
2023-03-03 10:00:48 -06:00
David Porter
e9ecdf3534 test: Emit ginkgo log for each node e2e
When running multiple node e2e with multiple machine images, the tests
are run separately for each node. The final build log has all of the
results for each of the hosts combined together which make debugging the
log difficult. To make it easier, emit a log for each host that was run.
This log will be written to the results directory and uploaded as an
artifact in prow jobs.

Signed-off-by: David Porter <david@porter.me>
2023-02-28 00:21:34 -08:00
Patrick Ohly
136f89dfc5 e2e: use error wrapping with %w
The recently introduced failure handling in ExpectNoError depends on error
wrapping: if an error prefix gets added with `fmt.Errorf("foo: %v", err)`, then
ExpectNoError cannot detect that the root cause is an assertion failure and
then will add another useless "unexpected error" prefix and will not dump the
additional failure information (currently the backtrace inside the E2E
framework).

Instead of manually deciding on a case-by-case basis where %w is needed, all
error wrapping was updated automatically with

    sed -i "s/fmt.Errorf\(.*\): '*\(%s\|%v\)'*\",\(.* err)\)/fmt.Errorf\1: %w\",\3/" $(git grep -l 'fmt.Errorf' test/e2e*)

This may be unnecessary in some cases, but it's not wrong.
2023-02-06 15:39:13 +01:00
Antonio Ojea
7f5ae1c0c1
Revert "e2e: wait for pods with gomega" 2023-02-06 12:08:22 +01:00
Patrick Ohly
222f655062 e2e: use error wrapping with %w
The recently introduced failure handling in ExpectNoError depends on error
wrapping: if an error prefix gets added with `fmt.Errorf("foo: %v", err)`, then
ExpectNoError cannot detect that the root cause is an assertion failure and
then will add another useless "unexpected error" prefix and will not dump the
additional failure information (currently the backtrace inside the E2E
framework).

Instead of manually deciding on a case-by-case basis where %w is needed, all
error wrapping was updated automatically with

    sed -i "s/fmt.Errorf\(.*\): '*\(%s\|%v\)'*\",\(.* err)\)/fmt.Errorf\1: %w\",\3/" $(git grep -l 'fmt.Errorf' test/e2e*)

This may be unnecessary in some cases, but it's not wrong.
2023-01-31 13:01:39 +01:00
Aditi Sharma
d83c37c311 Update CNI version to 1.2.0
Signed-off-by: Aditi Sharma <adi.sky17@gmail.com>
2023-01-18 13:24:40 +05:30
Kubernetes Prow Robot
6f579d3ceb
Merge pull request #111616 from ndixita/credential-api-ga
Move the Kubelet Credential Provider feature to GA and Update the Credential Provider API to GA
2022-10-15 07:53:09 -07:00
Dixita Narang
1ac4fc779b Update kubelet credential provider tests to use new v1 APIs 2022-09-30 20:51:39 +00:00
Patrick Ohly
41619ace15 stop using deprecated klog flags
Some scripts and tools still relied on the deprecated flags, the ones
which are about to be removed.

This is intentionally not a complete removal of all those flags in the entire
repo. This would lead to much more code churn also in places where commands
still accept the flags because they use klog directly.
2022-09-04 21:02:43 +02:00
Davanum Srinivas
50bea1dad8
Move from k8s.gcr.io to registry.k8s.io
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-05-31 10:16:53 -04:00
Andrew Sy Kim
ef3c4fb3cd test/e2e_node: update credential provider config to use v1beta1 kubelet
APIs

Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
2022-03-24 23:28:37 -04:00
Aditi Sharma
51cd36cf80 prepend credential provider flags on ubuntu also 2022-03-24 14:08:41 +05:30
Andrew Sy Kim
a4b79590eb move cluster/gce/gci/credential-provider to test/e2e_node/plugins/gcp-credential-provider
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
2022-03-23 10:30:02 -04:00
Andrew Sy Kim
ddeb1e1352 cluster/gce/gci/credential-provider: add barebones GCP credential provider for testing only
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
Co-authored-by: Aditi Sharma <adi.sky17@gmail.com>
2022-03-23 10:30:01 -04:00
Andrew Sy Kim
f440a69c70 test/e2e_node: install and configure kubelet credential provider
Signed-off-by: Andrew Sy Kim <andrewsy@google.com>
Co-authored-by: Aditi Sharma <adi.sky17@gmail.com>
2022-03-23 10:30:01 -04:00
ahrtr
fe95aa614c io/ioutil has already been deprecated in golang 1.16, so replace all ioutil with io and os 2022-02-03 05:32:12 +08:00
shuheiktgw
79484ed7b6 Check key existence in the getPrivateSSHKey function 2021-11-27 15:00:24 +09:00
shuheiktgw
db4a743b77 Check the private SSH key existence in the node e2e tests 2021-11-23 17:20:42 +09:00
Danielle Lancashire
4097a3d472 e2e_node: allow customizing the base kubeletconfig
This commit forces Kubelet Configuration files to always be generated
and when possible will use the kubeletconfig file that has been provided
by the test orchestrator
2021-11-02 15:09:56 +01:00
Danielle Lancashire
f1deb0ba2e e2e_node: remote: add kubeletconfig to archive
This commit enables the remote runner to provide a KubeletConfiguration
file to the test suite when uploading it to a remote host, thet test
runner will then use this configuration to run the Kubelet with the
provided config.
2021-11-02 15:08:39 +01:00
Danielle Lancashire
7dbbfe38e1 e2e_node: remote runner: junitFilePrefix -> junitFileName 2021-11-02 15:08:39 +01:00
Namanl2001
85d16760f0
adding defaultGceKey in remote/ssh.go
Signed-off-by: Namanl2001 <namanlakhwani@gmail.com>
2021-10-19 00:07:36 +05:30
Lennart Jern
507710b50f
Update CNI plugins v0.9.1
ref: https://github.com/containernetworking/plugins/releases/tag/v0.9.1
Signed-off-by: Lennart Jern <lennart.jern@est.tech>
2021-05-26 11:02:04 +03:00
Artyom Lukianov
93ff47b05b e2e node: make possible to add additional kernel arguments
Add an option to configure additional kernel arguments during
the setup of e2e node environment.

The example:
cos-stable1:
image_family: cos-89-lts # docker v19.03.6, deprecated after 2021-06-24
project: cos-cloud
metadata: "user-data<test/e2e_node/jenkins/cos-init-live-restore.yaml,gci-update-strategy=update_disabled"
kernel_arguments:
- "numa=fake=2"
machine: n1-standard-4

Signed-off-by: Artyom Lukianov <alukiano@redhat.com>
2021-05-11 13:49:32 +03:00
Amim Knabben
0341e4c2f3 Enabling runtime config on E2E node tests 2021-03-08 15:45:06 -05:00
Benjamin Elder
56e092e382 hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
Harshal Patil
b76abcd243 Remove the typo in the logs while configuring firewall for node e2e
Signed-off-by: Harshal Patil <harpatil@redhat.com>
2020-11-18 14:20:59 +05:30
Kubernetes Prow Robot
36d12390a7
Merge pull request #95906 from harche/iptables_fix
Verify iptable rules are applied for tcp, udp and icmp
2020-11-17 22:08:04 -08:00
Harshal Patil
f3bfc9fd67 Verify iptable rules are applied for tcp, udp and icmp
Signed-off-by: Harshal Patil <harpatil@redhat.com>
2020-11-12 13:29:13 +05:30
Morgan Bauer
9b8c1dcd19
reenable e2e_node services & debugging improvements
- re-enable e2e_node services
 - call GenerateSecureToken for e2e_node Conformance test-suite
 - add log messages indicating location in process
 - move log messages to some more accurate locations
2020-11-03 10:09:56 -08:00
Harshal Patil
a4cd6f13c8 Add SELinux labels for kubelet on Fedora CoreOS
Signed-off-by: Harshal Patil <harpatil@redhat.com>
2020-10-06 14:53:47 +05:30
Stephen Augustus
e59d9f372d Update CNI plugins to v0.8.7
ref: https://github.com/containernetworking/plugins/releases/tag/v0.8.7

Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-08-31 09:01:07 -04:00
Harshal Patil
9d5ca30b76 Read ssh username from env variable
Signed-off-by: Harshal Patil <harpatil@redhat.com>
2020-08-17 17:49:26 +05:30
Amim Knabben
c39cf28ed3 Moving Kubelet kernel-memgc-notification to configuration file 2020-06-24 06:44:00 -04:00
Stephen Augustus
b692502a9d Update CNI to v0.8.6
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-05-22 17:48:56 -04:00
Davanum Srinivas
07d88617e5
Run hack/update-vendor.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:33 -04:00
Davanum Srinivas
442a69c3bd
switch over k/k to use klog v2
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2020-05-16 07:54:27 -04:00
Stephen Augustus
1174e6698e cni: Update CNI version to v0.8.5
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-01-29 04:41:29 -05:00
Stephen Augustus
96f2588b61 cni: Update CNI download URLs to use new GCS bucket (k8s-artifacts-cni)
Signed-off-by: Stephen Augustus <saugustus@vmware.com>
2020-01-29 02:32:22 -05:00
SataQiu
69aae3aa5a fix golint failures of test/e2e_node/remote 2019-11-29 18:11:55 +08:00
Nabarun Pal
83c443e728
Fixes static check failures in test/e2e_node/* 2019-09-14 00:39:45 +05:30
Davanum Srinivas
7b8c9acc09
remove unused code
Change-Id: If821920ec8872e326b7d85437ad8d2620807799d
2019-04-19 08:36:31 -04:00
Dan Williams
bfd8ad3268 build/gci: bump CNI version to 0.7.5 2019-03-18 17:16:42 -05:00
Kubernetes Prow Robot
646145f578
Merge pull request #74125 from tuanvcw/fixing_typo
Fix many typos in both code and comments
2019-03-01 14:08:45 -08:00
Vu Cong Tuan
c747b7f38d Fix many typos in both code and comments
Signed-off-by: Vu Cong Tuan <tuanvc@vn.fujitsu.com>
2019-02-27 14:41:02 +07:00
Zhen Wang
6df207bdaa allows configuring NPD image version in node e2e test and fix the test 2019-02-26 21:29:50 -08:00
Dmitry Rozhkov
43fce8d6e4 e2e-node-tests: fix path to system specs
e2e-node tests may use custom system specs for validating nodes to
conform the specs. The functionality is switched on when the tests
are run with this command:

    make SYSTEM_SPEC_NAME=gke test-e2e-node

Currently the command fails with the error:

    F1228 16:12:41.568836   34514 e2e_node_suite_test.go:106] Failed to load system spec: open /home/rojkov/go/src/k8s.io/kubernetes/k8s.io/kubernetes/cmd/kubeadm/app/util/system/specs/gke.yaml: no such file or directory

Move the spec file under `test/e2e_node/system/specs` and introduce a single
public constant referring the file to use instead of multiple private constants.
2019-01-10 10:37:55 +02:00