kubernetes/test/e2e_node
Francesco Romani 2ea47038b9 podresources: e2e: force eager connection
Add and use more facilities to the *internal* podresources client.
Checking e2e test runs, we have quite some
```
rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial unix /var/lib/kubelet/pod-resources/kubelet.sock: connect: connection refused": rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial unix /var/lib/kubelet/pod-resources/kubelet.sock: connect: connection refused"
```

This is likely caused by kubelet restarts, which we do plenty in e2e tests,
combined with the fact gRPC does lazy connection AND we don't really
check the errors in client code - we just bubble them up.

While it's arguably bad we don't check properly error codes, it's also
true that in the main case, e2e tests, the functions should just never
fail besides few well known cases, we're connecting over a
super-reliable unix domain socket after all.

So, we centralize the fix adding a function (alongside with minor
cleanups) which wants to trigger and ensure the connection happens,
localizing the changes just here. The main advantage is this approach
is opt-in, composable, and doesn't leak gRPC details into the client
code.

Signed-off-by: Francesco Romani <fromani@redhat.com>
2023-09-07 08:24:49 +02:00
..
builder Setup e2e_node to support testing on ARM64 2023-05-20 00:07:44 +00:00
conformance stop using deprecated klog flags 2022-09-04 21:02:43 +02:00
environment Merge pull request #109753 from matthyx/109577 2022-05-13 07:33:49 -07:00
jenkins Avoid pulling mounter.tar through the CDN 2023-07-28 22:15:55 -04:00
kubeletconfig Move kubelet config API to e2e_node 2023-04-14 17:56:15 +03:00
perf/workloads e2e: use error wrapping with %w 2023-02-06 15:39:13 +01:00
perftype hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
plugins/gcp-credential-provider Merge pull request #116901 from pacoxu/cleanup-KubeletCredentialProviders 2023-05-08 07:55:53 -07:00
remote Update CNI plugins to v1.3.0 2023-08-17 09:50:53 +02:00
runner Setup e2e_node to support testing on ARM64 2023-05-20 00:07:44 +00:00
services Drop docker.log and add cloud-init-output.log 2023-06-28 18:08:40 -04:00
system hack/update-bazel.sh 2021-02-28 15:17:29 -08:00
testing-manifests e2e: node: remove kubevirt device plugin 2023-02-22 14:04:22 +01:00
.import-restrictions Restrict what imports get into code within test/e2e_node 2023-08-21 15:04:23 -04:00
apparmor_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
benchmark_util.go e2e: adapt to moved code 2022-10-06 08:19:47 +02:00
checkpoint_container.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
container_lifecycle_pod_construction.go Add an e2e test for the pod sandbox changed scenario 2023-09-01 00:13:47 +09:00
container_lifecycle_test.go Add an e2e test for the pod sandbox changed scenario 2023-09-01 00:13:47 +09:00
container_log_rotation_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
container_manager_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
cpu_manager_metrics_test.go Merge pull request #118280 from stlaz/e2e_psa_labels 2023-06-28 11:14:43 -07:00
cpu_manager_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
critical_pod_test.go Fix should be able to create and delete a critical pod test 2023-07-03 11:15:59 +02:00
deleted_pods_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
density_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
device_manager_test.go podresources: e2e: force eager connection 2023-09-07 08:24:49 +02:00
device_plugin_test.go Merge pull request #118635 from ffromani/devmgr-check-pod-running 2023-07-15 05:43:16 -07:00
doc.go fix golint issues in test/e2e_node 2019-11-26 16:26:55 +08:00
dra_test.go kubelet: support batched prepare/unprepare in v1alpha3 DRA plugin API 2023-07-12 14:50:30 +02:00
e2e_node_suite_test.go e2e: detect unexpected command line arguments 2023-07-05 13:34:09 +02:00
eviction_test.go fix a pidpressure test flake 2023-08-30 22:44:36 -05:00
framework.go update ginkgo from v1 to v2 and gomega to 1.19.0 2022-07-08 10:44:46 +08:00
garbage_collector_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
gubernator.sh fix test/e2e_node/gubernator.sh shellcheck failures 2019-06-23 17:01:54 -07:00
hugepages_test.go Merge pull request #118280 from stlaz/e2e_psa_labels 2023-06-28 11:14:43 -07:00
image_id_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
image_list.go Revert "bump npd to v0.8.14" 2023-09-05 20:28:53 -05:00
lock_contention_linux_test.go e2e: use Ginkgo context 2022-12-16 20:14:04 +01:00
log_path_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
memory_manager_test.go podresources: e2e: force eager connection 2023-09-07 08:24:49 +02:00
mirror_pod_grace_period_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
mirror_pod_test.go fix mirror pod nfs test failure due to differing NFS versions 2023-08-11 07:27:05 -05:00
node_container_manager_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
node_perf_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
node_problem_detector_linux.go Extend npd e2e timeout to fix npd e2e error 2023-08-29 17:22:28 +08:00
node_shutdown_linux_test.go Skip GracefulNodeShutdown on older systemd versions 2023-07-07 16:08:42 -04:00
numa_alignment.go Depend on k8s.io/utils cpuset 2023-05-03 16:26:09 +00:00
oomkiller_linux_test.go Adding coverage for OOM Kill scenario due to node allocatable memory limits, when pod level memory limits are not set 2023-08-22 00:45:17 +00:00
os_label_rename_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
OWNERS Remove ehashman from sig-node roles 2022-11-01 12:16:43 -07:00
pids_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
pod_conditions_test.go Merge pull request #118280 from stlaz/e2e_psa_labels 2023-06-28 11:14:43 -07:00
pod_host_ips.go Add e2e to check that hostIPs and Downward API works 2023-07-14 09:35:31 +08:00
pod_hostnamefqdn_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
podresources_test.go podresources: e2e: force eager connection 2023-09-07 08:24:49 +02:00
pods_container_manager_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
pods_lifecycle_termination_test.go bump the busybox test version to resolve test failures 2023-08-16 08:50:20 -05:00
quota_lsci_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
README.md Removed broken link to Analytics 2020-08-13 16:03:37 -04:00
resource_collector.go Bump cadvisor version in tests to v0.47.2 2023-06-29 09:58:31 -04:00
resource_metrics_test.go expect the new resource_scape_error metric 2023-08-20 14:17:54 -05:00
resource_usage_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
restart_test.go Merge pull request #118280 from stlaz/e2e_psa_labels 2023-06-28 11:14:43 -07:00
runtime_conformance_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
runtimeclass_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
seccompdefault_test.go remove the legacy test dependency 2023-08-17 12:54:20 -05:00
security_context_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
standalone_test.go Merge pull request #118280 from stlaz/e2e_psa_labels 2023-06-28 11:14:43 -07:00
summary_test.go Adjust summary API e2e test 2023-07-18 02:55:56 +03:00
swap_test.go Add a swap e2e test 2023-07-14 14:52:28 +03:00
system_node_critical_test.go node_e2e: Fix createStaticSystemNodeCriticalPod's invalid spec 2023-07-20 20:18:05 +09:00
terminate_pods_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
topology_manager_metrics_test.go Merge pull request #118280 from stlaz/e2e_psa_labels 2023-06-28 11:14:43 -07:00
topology_manager_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
unknown_pods_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00
util.go podresources: e2e: force eager connection 2023-09-07 08:24:49 +02:00
util_sampledevice.go test: Fix path to e2e node sample device plugin 2023-03-02 19:22:59 -08:00
util_sriov.go e2e: TM: add option to fail instead of skip 2021-09-13 13:23:36 +02:00
util_sriov_linux.go e2e: TM: add option to fail instead of skip 2021-09-13 13:23:36 +02:00
util_sriov_unsupported.go e2e: TM: add option to fail instead of skip 2021-09-13 13:23:36 +02:00
util_xfs_linux.go generated: Run hack/update-gofmt.sh 2021-08-24 15:47:49 -04:00
util_xfs_unsupported.go generated: Run hack/update-gofmt.sh 2021-08-24 15:47:49 -04:00
utils_linux.go generated: Run hack/update-gofmt.sh 2021-08-24 15:47:49 -04:00
utils_unsupported.go generated: Run hack/update-gofmt.sh 2021-08-24 15:47:49 -04:00
volume_manager_test.go e2e tests: set all PSa labels instead of just enforcing 2023-06-21 15:05:13 +02:00