Commit Graph

106211 Commits

Author SHA1 Message Date
Patrick Ohly
a5a241e0df logs: update expected output for multi-line test case
The multiline support has been merged while this benchmark was written. We now
get the output that we want, with line breaks.
2022-01-11 09:57:03 +01:00
Patrick Ohly
25c646cbdd json: never call fsync for stdout or stderr
We don't need to worry about data loss once the data has been written to an
output stream. Calling fsync unnecessarily has been the reason for performance
issues in the past.
2022-01-11 09:56:22 +01:00
Patrick Ohly
9a867c555c logs: benchmark write performance
The recent regression https://github.com/kubernetes/kubernetes/issues/107033
shows that we need a way to automatically measure different logging
configurations (structured text, JSON with and without split streams) under
realistic conditions (time stamping, caller identification).

System calls may affect the performance and thus writing into actual files is
useful. A temp dir under /tmp (usually a tmpfs) is used, so the actual IO
bandwidth shouldn't affect the outcome. The "normal" json.Factory code is used
to construct the JSON logger when we have actual files that can be set as
os.Stderr and os.Stdout, thus making this as realistic as possible.

When discarding the output instead of writing it, the focus is more on the rest
of the pipeline and changes there can be investigated more reliably.

The benchmarks automatically gather "log entries per second" and "bytes per
second", which is useful to know when considering requirements like the ones
from https://github.com/kubernetes/kubernetes/issues/107029.
2022-01-11 09:56:22 +01:00
Patrick Ohly
b8501fc10b logs: work around logcheck
logcheck complains:
Additional arguments to ErrorS should always be Key Value pairs. Please check if there is any key or value missing.

That check is intentional, but not applicable here. The check can be worked
around by calling the functions through variables.
2022-01-11 09:56:22 +01:00
Patrick Ohly
072859c967 logs: create separate test/integration directory
The benchmark depends on k8s.io/api (for v1.Container). Such a dependency is
not desirable for k8s.io/component-base/logs, even if it's just for
testing. The solution is to create a separate directory where such a dependency
isn't a problem.

The alternative, a separate package with its own go.mod file under
k8s.io/component-base/logs wouldd have been more complicated to maintain (yet
another go.mod file and different whitelisted dependencies).
2022-01-11 09:56:22 +01:00
Patrick Ohly
8e2f03d336 logs: add benchmark
The benchmark reads a JSON log file and measures how long it takes to re-encode
it. The focus is on the encoding of message and values, therefore additional
work (time stamping, caller, writing to file) gets avoided.
2022-01-11 09:56:21 +01:00
Patrick Ohly
40b38f09d9 json: more flexible constructor
The encoder configuration can now be chosen by the caller. This will be used by
a benchmark to write messages without caller and time stamp.

While at it, some places where the logger was unnecessarily tested with split
output streams writing into the same actual stream were replaced with writing
as single stream. This is a leftover from a previous incarnation of the split
output stream patch where identical streams were used instead of nil for the
error stream to indicate "single stream".
2022-01-11 09:56:21 +01:00
Patrick Ohly
798bdab3d0 kubectl: add integration test for result reporting
This currently covers two cases:
- "kubectl list" (the regression from https://github.com/kubernetes/kubernetes/issues/107012)
- "kubectl get pods/no-such-pod" (no particular reason except that the output
should be deterministic)

In contrast to some other tests that check for strings inside the
output (run_deprecated_api_tests) or compare after
sorting (run_kubectl_version_tests), stdout, stderr and the return code must
match exactly.

This ensures that there is no extra, unexpected output and that the right
output stream is used.
2022-01-11 09:04:56 +01:00
Davanum Srinivas
7fd97433f0
Next step in CSI migration for openstack
delete/modify tests that use intree cinder as well.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-01-10 22:07:44 -05:00
Kubernetes Prow Robot
a0dfd958d5
Merge pull request #107163 from cyclinder/fix_leak_goroutine
fix goroutine leaks in TestConfigurationChannels
2022-01-10 17:23:16 -08:00
Kubernetes Prow Robot
ca4af7a981
Merge pull request #104716 from sanposhiho/feature/scheduler_perf/unused-template-params
test/integration/scheduler_perf: check for unused template parameters
2022-01-10 16:21:16 -08:00
Kubernetes Prow Robot
3cec1d1a13
Merge pull request #107452 from liggitt/timeout_headers
Fix header mutation race in timeout filter
2022-01-10 14:36:37 -08:00
Kubernetes Prow Robot
5d950ceee4
Merge pull request #104669 from arekkusu/patch-3
Update GKE kubernetes sources download link
2022-01-10 14:36:25 -08:00
Kubernetes Prow Robot
e9e9bd0bf0
Merge pull request #107455 from aojea/invalid.com
use a community owned domain for the invalid registry
2022-01-10 13:34:48 -08:00
Kubernetes Prow Robot
10ded7501a
Merge pull request #107402 from anguslees/proxyzero
Reject proxy requests to 0.0.0.0 as well
2022-01-10 13:34:36 -08:00
Kubernetes Prow Robot
ccccd90bbc
Merge pull request #107389 from jlsong01/refine_comments_quota_monitor
refine comments of quota monitor
2022-01-10 13:34:25 -08:00
Mikhail Mazurskiy
0b8d725f5a
Close HTTP response body on failed GET attempts (#105591)
* Close response body when it's not needed

* Code cleanups
2022-01-10 11:40:26 -08:00
Antonio Ojea
742dd6b9c7 use a community owned domain for the invalid registry 2022-01-10 19:37:46 +01:00
Kubernetes Prow Robot
cc16e7792f
Merge pull request #106029 from astraw99/fix-workqueue-forget
Add GC workqueue `Forget` to stop the rate limiter
2022-01-10 10:07:24 -08:00
Kubernetes Prow Robot
0f84fa1e61
Merge pull request #104927 from zc2638/fix/in-tree-volume-test
fix the problem of using `%w` incorrectly
2022-01-10 10:07:12 -08:00
Jordan Liggitt
5b2a31f375 Fix header mutation race in timeout filter 2022-01-10 12:24:48 -05:00
Kubernetes Prow Robot
d1f559711d
Merge pull request #107441 from humblec/more-pv-source
correct struct fields in VolumeSource and PersistentVolumeSource
2022-01-10 09:07:24 -08:00
Kubernetes Prow Robot
d2fb197653
Merge pull request #99099 from eltociear/patch-3
Fix typo in empty_dir.go
2022-01-10 09:07:13 -08:00
Patrick Ohly
a5d2d6fec3 cli: let kubectl handle error printing
cli.Run was an attempt to elliminate error handling in Kubernetes
commands. However, it had to rely on heuristics that are not necessarily right
for all commands.

kubectl is one example which has its own error printing code that should be
used in all cases after a command failure. It now gets used also for
`--warnings-as-errors`. Previously, that caused the following message to be
logged at the end:

  E0110 16:56:01.987555  202060 run.go:120] "command failed" err="1 warning received"

Now it ends with:

 error: 1 warning received
2022-01-10 17:09:30 +01:00
Kubernetes Prow Robot
eb64a3e13a
Merge pull request #107384 from sanposhiho/math-round-in-pod-topology-spread
Use `math.Round` when convert float to int in PodTopologySpread
2022-01-10 07:13:24 -08:00
Kubernetes Prow Robot
20a5b335c5
Merge pull request #105853 from caden2016/master
restore NumPDBViolations info of nodes, when HTTPExtender ProcessPree…
2022-01-10 07:13:12 -08:00
Davanum Srinivas
ba1f853b5a
Add mwielgus back
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-01-10 09:02:53 -05:00
Davanum Srinivas
3b2839f563
run update-yamlfmt.sh
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-01-10 08:14:37 -05:00
Davanum Srinivas
6fb5da3e62
add sig-docs-approvers back
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-01-10 08:14:36 -05:00
Davanum Srinivas
c2f041b0df
add autoscaling maintainers back
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-01-10 08:14:34 -05:00
Davanum Srinivas
ada4b73648
add munnerz back
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-01-10 08:14:34 -05:00
Davanum Srinivas
0f115f1946
add wlan0 back
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-01-10 08:14:33 -05:00
Davanum Srinivas
9682b7248f
OWNERS cleanup - Jan 2021 Week 1
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-01-10 08:14:29 -05:00
Alexander Wels
8e29bb0454
Update test/e2e/storage/testsuites/provisioning.go
Add missing brackets

Co-authored-by: Patrick Ohly <patrick.ohly@intel.com>
2022-01-10 07:00:21 -06:00
Alexander Wels
59dcddae47
Update test/e2e/storage/testsuites/provisioning.go
Add missing brackets.

Co-authored-by: Patrick Ohly <patrick.ohly@intel.com>
2022-01-10 07:00:03 -06:00
Sascha Grunert
fcca81aeae
Fix AppArmor unloaded profile e2e test
With the removal of the kubelet AppArmor profile validation in
https://github.com/kubernetes/kubernetes/pull/97966 we passed the
responsibility of the desired behavior to the container runtime.
Therefore we have to change the e2e test which silently broke after the
PR merge.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2022-01-10 13:22:11 +01:00
cyclinder
928e686877 fix goroutine leaks in TestConfigurationChannels
Signed-off-by: cyclinder <qifeng.guo@daocloud.io>
2022-01-10 19:51:16 +08:00
Kubernetes Prow Robot
ba82add41a
Merge pull request #107420 from 21kyu/fix-typos
fix typos in comment
2022-01-10 00:07:11 -08:00
caden
f84c07e8f4 restore NumPDBViolations info of nodes, when HTTPExtender ProcessPreemption. This info will be used in subsequent filtering steps - pick OneNodeForPreemption.
add unit tests for HTTPExtender.ProcessPreemption - make sure the NumPDBViolations info of node is return as it is.
2022-01-10 13:37:46 +08:00
Humble Chirammal
ba7c4a9411 correct struct fields in VolumeSource and PersistentVolumeSource
The field names in godoc for PersistentVolumeSource and
VolumeSource have been corrected with this commit.

Additional Ref# #105963 (comment)

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-01-10 10:41:14 +05:30
Kubernetes Prow Robot
559091ba4f
Merge pull request #107339 from andrewsykim/internal-traffic-policy-external-name-validation
Add Service integration tests for internalTrafficPolicy when Type=ExternalName
2022-01-09 02:47:12 -08:00
Kubernetes Prow Robot
13a06cc479
Merge pull request #107427 from NikhilSharmaWe/remLog
removed unnecessary log line
2022-01-09 01:35:11 -08:00
andyzhangx
d957dcf5a0 fix: azuredisk parameter lowercase translation issue 2022-01-09 08:36:26 +00:00
astraw99
a5a54754d5 refactor garbagecollection controllers to make forget impossible to forget 2022-01-09 15:19:10 +08:00
Nikhil Sharma
c58fec6ccf removed unnecessary log line 2022-01-09 11:48:03 +05:30
yanghesong
b4f6eb681c Remove runtime in validate
Validate is useless as dockershim is removed

Signed-off-by: yanghesong <hesong.yang@foxmail.com>
2022-01-09 09:19:31 +08:00
yanghesong
6905fef761 Remove runtime in validate
Validate is useless as dockershim is removed

Signed-off-by: yanghesong <hesong.yang@foxmail.com>
2022-01-09 09:11:49 +08:00
Kubernetes Prow Robot
d2c9456963
Merge pull request #106287 from Dragoncell/update_cadvisor_version
update cadvisor version in test
2022-01-08 15:50:19 -08:00
wq
4f38d4aaa1 fix a typo in the comment of ImageCredentialProviderConfigFile 2022-01-09 00:07:43 +09:00
wq
3e29321790 fix typos in comment 2022-01-08 23:39:23 +09:00