Commit Graph

116719 Commits

Author SHA1 Message Date
Kir Kolyshkin
8ced101db5 mount-utils: stop using ioutil in tests
io/ioutil is deprecated since Go 1.16. Besides, we now have a nice
t.TempDir() function which simplifies things a lot.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-06-13 18:50:33 -07:00
Kir Kolyshkin
699d118d85 mount-utils: stop using ioutil
It has been deprecated since Go 1.16.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-06-13 18:50:33 -07:00
Kir Kolyshkin
b690450e84 mount-utils: don't reread mountinfo on newer kernels
1. Background.

Since the dawn of times mount-utils package tries to work around the bug
in the Linux kernel, which results in occasional incomplete read of
mountinfo entries (from either /proc/mounts or /proc/PID/mountinfo).
The workaround used is to read the whole file twice and compare the two
blobs. If they differ, try again.

The kernel bug is manifesting when mountinfo read is performed
concurrently with an unmount, and can easily be reproduced by running
lots of mounts and unmounts in parallel with the code reading mountinfo.
For one such reproducer, see https://github.com/kolyshkin/procfs-test.

On a Kubernetes node with lots of short-lived containers, mounts and
unmounts are quite frequent. This leads to the occasional bug, and
surely results in much more re-reads of mountinfo, because the
workaround assumes its content is more-or-less static.

The good news is, this bug was finally fixed by kernel commit
9f6c61f96f2d97, which made its way into Linux 5.8.

2. The issue.

The code still read every file at least twice, and up to 10 times. The
chance of re-reading is higher if there is a mount or unmount going on
at the same time. The result is higher system and kernel load, and
degraded performance.

3. The fix.

As the re-reading is not necessary for newer kernels, let's check the
kernel version and skip the workaround if running Linux >= 5.8.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-06-13 18:50:27 -07:00
Kir Kolyshkin
8c79a91133 mount-utils: isMountPointMatch: simplify and speedup
Here's before/after comparison.

[kir@kir-rhat mount-utils]$ benchstat before after
name                 old time/op    new time/op    delta
IsMountPointMatch-4     707ns ± 1%      40ns ± 1%   -94.39%  (p=0.008 n=5+5)

name                 old alloc/op   new alloc/op   delta
IsMountPointMatch-4      264B ± 0%        0B       -100.00%  (p=0.008 n=5+5)

name                 old allocs/op  new allocs/op  delta
IsMountPointMatch-4      11.0 ± 0%       0.0       -100.00%  (p=0.008 n=5+5)

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-06-13 18:35:41 -07:00
Kir Kolyshkin
404e844468 mount-utils: add isMountPointMatch test and benchmark
Add some test cases for isMountPointMatch, to prepare for its rework.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-06-13 18:35:41 -07:00
Kir Kolyshkin
4bb0239279 mount-utils: IsMountPoint: fix
Commit 44bea35804 added a code to return unwrapped fs.ErrNotExist
error in case filepath.EvalSymlinks failed a wrapped one.

This never worked because of a copy/paste bug.

Fix this.

Fixes: 44bea35804
Cc: Manu Gupta <manugupt1@gmail.com>
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-06-13 18:35:41 -07:00
Kir Kolyshkin
167252fb5e mount-utils: format with gofumpt
gofumpt is a superset of go fmt, enabling some more strict formatting
rules, mostly to improve code readability.

No functional or code change, just formatting.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
2023-06-13 18:35:41 -07:00
Monis Khan
55b690ee01
kmsv2: no-op refactor priming logic into its own function
Signed-off-by: Monis Khan <mok@microsoft.com>
2023-06-13 18:24:50 -04:00
Monis Khan
15003c609d
kmsv2: refine probing logic to avoid slow starts
Signed-off-by: Monis Khan <mok@microsoft.com>
2023-06-13 16:59:23 -04:00
Monis Khan
d8150b8160
kmsv2: add a sanity check to confirm that new state is always valid
Signed-off-by: Monis Khan <mok@microsoft.com>
2023-06-13 16:34:56 -04:00
Kubernetes Prow Robot
666fc23fe4
Merge pull request #118539 from benluddy/timeout-filter-flake
Ensure timeout test handlers don't complete before timing out.
2023-06-13 09:21:58 -07:00
Kubernetes Prow Robot
cdbdb17934
Merge pull request #118567 from chendave/node_arm_ci
Pass the mandatory parameters to build arm64 binaries
2023-06-13 08:22:11 -07:00
Kubernetes Prow Robot
bca1336021
Merge pull request #118530 from carlory/fix-issue-118276
fix Cronjob status.lastSuccessfulTime not populated by a manually triggered job
2023-06-13 08:21:59 -07:00
Kubernetes Prow Robot
232cdf9716
Merge pull request #118624 from jsafrane/iscsi-dbus
iscsi: use dbus from the host
2023-06-13 05:00:09 -07:00
Kubernetes Prow Robot
e80e6b8e5a
Merge pull request #118597 from tkashem/apf-refactor
apf: refactor bootstrap ensure strategy
2023-06-13 04:59:58 -07:00
Kubernetes Prow Robot
8fd27c6137
Merge pull request #118574 from bart0sh/PR118-DRA-E2E-Node-test-grpc-timeout
DRA: E2E Node: test GRPC timeout
2023-06-13 03:39:58 -07:00
Ed Bartosh
4960207b31 DRA Node E2E: test NodePrepareResource timeout 2023-06-13 12:42:05 +03:00
Ed Bartosh
5c5f6e8fe2 DRA Node E2E: add NodePrepareResourceCalled API 2023-06-13 12:42:05 +03:00
Ed Bartosh
673d0aaa60 DRA Node E2E: add call blocking to the Kubelet plugin APIs 2023-06-13 12:41:59 +03:00
Kubernetes Prow Robot
3b44969134
Merge pull request #118460 from serathius/componentstatuses
Make etcd component status consistent with health probes
2023-06-13 02:17:58 -07:00
Marek Siarkowicz
a60314c47e Make etcd component status consistent with health probes
Co-authored-by: Antonio Ojea <antonio.ojea.garcia@gmail.com>
2023-06-13 10:10:29 +02:00
Kubernetes Prow Robot
96b08afd9c
Merge pull request #118620 from byako/fix-dra-e2e-readme
Update Kind details for DRA e2e
2023-06-13 00:43:58 -07:00
Kubernetes Prow Robot
d701b6be0f
Merge pull request #118629 from jeremyrickard/update-publishing-bot-go11910
Update publishing-bot rules for release branches to Go 1.19.10
2023-06-12 23:31:57 -07:00
Etienne Champetier
e1735b9863 Make CA valid 1 hour in the past
When running kubeadm / installing k8s early during boot,
the CA certificate can be generated before time is synchronised
and time is jumped backward.
Make notBefore 1 hour in the past to accept small clock jump.

Signed-off-by: Etienne Champetier <e.champetier@ateme.com>
2023-06-13 01:34:41 -04:00
Kubernetes Prow Robot
83d30f4463
Merge pull request #118342 from yt2985/cleanSA
Fix the flaky legacy_service_account_token_clean_up_test.
2023-06-12 22:33:57 -07:00
Kubernetes Prow Robot
b4a7427ac3
Merge pull request #118157 from deveshgoyal1000/patch-1
Update typo in k8s.po in line 2170
2023-06-12 21:28:09 -07:00
Kubernetes Prow Robot
c1154d838f
Merge pull request #111992 from Abirdcfly/20220824
cleanup: delete unused AuditDynamicOptions in apiserver
2023-06-12 21:27:57 -07:00
carlory
5e048041e4 remove helper function for unused storage feature in pkg/proxy/util 2023-06-13 09:22:59 +08:00
Jeremy Rickard
e1aef2ac91
Bump publishing bot rules for Go 1.19 branches
Signed-off-by: Jeremy Rickard <jeremyrrickard@gmail.com>
2023-06-12 18:41:41 -06:00
tinatingyu
9cb52a6872 Fix the flaky legacy_service_account_token_clean_up_test. 2023-06-13 00:11:13 +00:00
Kubernetes Prow Robot
86d786090a
Merge pull request #117793 from tzneal/memory-oom-group-support
use the cgroup aware OOM killer if available
2023-06-12 14:45:58 -07:00
Todd Neal
4e20a8f52b kill all processes in a container in the event of OOM
Set memory.oom.group if using cgroups v2 unified mode so all processes in
the container will be killed together in the event of an OOM kill.
2023-06-12 15:49:01 -05:00
Kubernetes Prow Robot
07646db483
Merge pull request #118623 from pohly/e2e-storage-stress-test-fix
e2e storage: terminate worker quietly on test completion
2023-06-12 13:47:05 -07:00
Kubernetes Prow Robot
d627045949
Merge pull request #118373 from saschagrunert/seccomp-unused
Remove unused `getSeccompProfilePath` helper function
2023-06-12 13:46:57 -07:00
Kubernetes Prow Robot
1de217b095
Merge pull request #118278 from mimowo/fix-pod-failure-policy-comments
Update podFailurePolicy comment from alpha-level to beta
2023-06-12 13:46:49 -07:00
Kubernetes Prow Robot
da4646c080
Merge pull request #118096 from tnqn/fix-confusing-check
Remove undesired verbose fields from log
2023-06-12 13:46:42 -07:00
Kubernetes Prow Robot
cc60a93485
Merge pull request #118055 from timofurrer/export-default-server-url-for-func
Export DefaultServerUrlFor utility function
2023-06-12 13:46:34 -07:00
Kubernetes Prow Robot
2353dac98a
Merge pull request #117964 from ytinirt/patch-1
Update --image-gc-low-threshold option's description
2023-06-12 13:46:26 -07:00
Kubernetes Prow Robot
32048b1467
Merge pull request #117550 from borgerli/cron-job-syncs
add --concurrent-cron-job-syncs flag for kube-controller-manager
2023-06-12 13:46:19 -07:00
Kubernetes Prow Robot
0f8f564e99
Merge pull request #116933 from haoruan/doc-fix-typo
fix a typo in test/e2e/apimachinery/resource_quota.go
2023-06-12 13:46:10 -07:00
Kubernetes Prow Robot
03486cec21
Merge pull request #116530 from pacoxu/undepreated-provider-id
undeprecate kubelet --provider-id flag
2023-06-12 13:45:58 -07:00
Alexey Fomenko
0222e6d4ae
Update kind details for DRA e2e 2023-06-12 23:34:02 +03:00
Kubernetes Prow Robot
49d7b3f0a0
Merge pull request #118596 from SataQiu/fix-kubelet-20230610
kubelet: mark '--azure-container-registry-config' flag as deprecated
2023-06-12 12:44:10 -07:00
Kubernetes Prow Robot
a4e6367bb6
Merge pull request #118481 from cbandy/client-go-testing-setenv
Replace os.Setenv with testing.T.Setenv in tests
2023-06-12 12:43:58 -07:00
Kubernetes Prow Robot
9d231f8ce7
Merge pull request #118329 from danwinship/fix-dual-stack-cloud-node-ip-annotation
Set the node-ips annotation correctly with CloudDualStackNodeIPs
2023-06-12 11:44:10 -07:00
Kubernetes Prow Robot
8a0b1bbf24
Merge pull request #118095 from carlory/patch-002
remove unused pv informer from expand_controller
2023-06-12 11:43:58 -07:00
Kubernetes Prow Robot
ecf54b8bd5
Merge pull request #118320 from bart0sh/PR115-cleanup-boilerplate.py
Cleanup boilerpate.py
2023-06-12 09:35:49 -07:00
Jan Safranek
75cf25c0e7 iscsi: use dbus from the host
When running iscsi test, use dbus socket from the host. targetcli uses the
socket for synchronization.

Recent Fedoras can run dbus only via systemd, which is cumbersome here.
2023-06-12 15:45:19 +02:00
Patrick Ohly
f7a5817bc6 e2e storage: terminate worker quietly on test completion
Once DeferCleanup for the worker goroutine is invoked, there's no need to
continue doing anything anymore in that goroutine and it can return
immediately, without reporting the "context canceled" error because there is no
other reason for that.
2023-06-12 15:41:43 +02:00
Kubernetes Prow Robot
18d05b646d
Merge pull request #117702 from kannon92/pod-ready-to-start-rename
feat: rename PodHasNetwork to PodReadyToStartContainers
2023-06-11 18:59:48 -07:00