Damien Grisonnet
55ec09d377
tools/events: fix data race when emitting series
...
There was a data race in the recordToSink function that caused changes
to the events cache to be overriden if events were emitted
simultaneously via Eventf calls.
The race lies in the fact that when recording an Event, there might be
multiple calls updating the cache simultaneously. The lock period is
optimized so that after updating the cache with the new Event, the lock
is unlocked until the Event is recorded on the apiserver side and then
the cache is locked again to be updated with the new value returned by
the apiserver.
The are a few problem with the approach:
1. If two identical Events are emitted successively the changes of the
second Event will override the first one. In code the following
happen:
1. Eventf(ev1)
2. Eventf(ev2)
3. Lock cache
4. Set cache[getKey(ev1)] = &ev1
5. Unlock cache
6. Lock cache
7. Update cache[getKey(ev2)] = &ev1 + Series{Count: 1}
8. Unlock cache
9. Start attempting to record the first event &ev1 on the apiserver side.
This can be mitigated by recording a copy of the Event stored in
cache instead of reusing the pointer from the cache.
2. When the Event has been recorded on the apiserver the cache is
updated again with the value of the Event returned by the server.
This update will override any changes made to the cache entry when
attempting to record the new Event since the cache was unlocked at
that time. This might lead to some inconsistencies when dealing with
EventSeries since the count may be overriden or the client might even
try to record the first isomorphic Event multiple time.
This could be mitigated with a lock that has a larger scope, but we
shouldn't want to reflect Event returned by the apiserver in the
cache in the first place since mutation could mess with the
aggregation by either allowing users to manipulate values to update
a different cache entry or even having two cache entries for the same
Events.
Signed-off-by: Damien Grisonnet <dgrisonn@redhat.com>
2022-12-02 16:36:09 +01:00
Kubernetes Prow Robot
dfc9bf0953
Merge pull request #112615 from mengjiao-liu/update_CRD_link
...
Update `PreserveUnknownFields` field document link
2022-09-22 07:59:16 -07:00
Kubernetes Prow Robot
5ce4f98a76
Merge pull request #112579 from SergeyKanzhelev/removePodOverhead
...
remove podOverhead feature gate as a feature is now GA since 1.24
2022-09-22 07:59:04 -07:00
Kubernetes Prow Robot
2dba4034f8
Merge pull request #112554 from kushagra98/variable-name-change
...
variable name change for better understanding
2022-09-22 03:37:02 -07:00
Kushagra
dc321b4d2a
requeted changes: fix variables in test cases
2022-09-22 09:17:15 +00:00
Kushagra
01b553145c
requested changes: fix return type variables
2022-09-22 08:59:02 +00:00
Kubernetes Prow Robot
febdfe72fc
Merge pull request #112659 from pacoxu/LocalStorageCapacityIsolationFSQuotaMonitoring-test
...
LocalStorageCapacityIsolationFSQuotaMonitoring: feature gate typo in e2e test
2022-09-22 01:57:03 -07:00
Kubernetes Prow Robot
7f129f1c9a
Merge pull request #112671 from yangjunmyfm192085/delklogv0
...
use klog.InfoS instead of klog.V(0).Infof(kubemark part)
2022-09-22 00:55:02 -07:00
JunYang
a6899eb1da
use klog.InfoS instead of klog.V(0).Infof(kubemark part)
2022-09-22 14:52:33 +08:00
Kubernetes Prow Robot
0fff024276
Merge pull request #112640 from humblec/rbd-owner
...
Add humblec to approvers and reviewers list for Ceph driver
2022-09-21 19:11:13 -07:00
Kubernetes Prow Robot
969d416bc4
Merge pull request #112603 from humblec/var-3
...
fix typos in pkg/validation and test/cmd
2022-09-21 19:11:02 -07:00
Paco Xu
ad3083b51e
LocalStorageCapacityIsolationFSQuotaMonitoring: feature gate typo in e2e node test
2022-09-22 10:06:48 +08:00
Kubernetes Prow Robot
ac868b17d6
Merge pull request #112058 from saschagrunert/cri-tools-v1.25
...
Update cri-tools to v1.25.0
2022-09-21 16:59:07 -07:00
Kubernetes Prow Robot
87ebae2a37
Merge pull request #112655 from xmudrii/missing-notes
...
Update changelogs for 1.25.2, 1.24.6, 1.23.12, and 1.22.15
2022-09-21 15:55:25 -07:00
Kubernetes Prow Robot
cdbb15c802
Merge pull request #112650 from rphillips/fixes/112124
...
kubelet: increase log level for "Path does not exist" in kubelet_getters
2022-09-21 15:55:13 -07:00
Kubernetes Prow Robot
07eb448c82
Merge pull request #112610 from alculquicondor/fix-stale-disruption
...
Fix flaky TestStalePodDisruption
2022-09-21 14:23:31 -07:00
Kubernetes Prow Robot
7486ed1777
Merge pull request #112457 from ramrodo/update-changelog-owners-1.26
...
Add approver and reviewers for 1.26
2022-09-21 14:23:24 -07:00
Kubernetes Prow Robot
d0a06a60a9
Merge pull request #112289 from electrocucaracha/add_tparallel-scheduling
...
Enable Parallel test execution in pkg/scheduler
2022-09-21 14:23:13 -07:00
Marko Mudrinić
09342b8572
CHANGELOG-1.25: Add missing changes for 1.25.2
...
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2022-09-21 22:44:23 +02:00
Marko Mudrinić
970a2da52d
CHANGELOG-1.24: Add missing changes for 1.24.6
...
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2022-09-21 22:44:12 +02:00
Marko Mudrinić
7ca1601428
CHANGELOG-1.23: Add missing changes for 1.23.12
...
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2022-09-21 22:43:56 +02:00
Marko Mudrinić
00a9ab6146
CHANGELOG-1.22: Add missing changes for 1.22.15
...
Signed-off-by: Marko Mudrinić <mudrinic.mare@gmail.com>
2022-09-21 22:43:41 +02:00
Kubernetes Release Robot
f046bdf24e
CHANGELOG: Update directory for v1.25.2 release
2022-09-21 20:18:04 +00:00
Ryan Phillips
205adec698
kubelet: increase log level for Path does not exist message
2022-09-21 14:16:44 -05:00
Kubernetes Release Robot
f38bf1ff3e
CHANGELOG: Update directory for v1.22.15 release
2022-09-21 19:03:57 +00:00
Kubernetes Release Robot
cf221692ae
CHANGELOG: Update directory for v1.23.12 release
2022-09-21 18:09:48 +00:00
Kubernetes Release Robot
85e46622bc
CHANGELOG: Update directory for v1.24.6 release
2022-09-21 16:50:42 +00:00
Humble Chirammal
c15757d611
Add humblec to approvers and reviewers list for Ceph driver
...
Ref#
https://github.com/kubernetes/kubernetes/pull/95361
https://github.com/kubernetes/kubernetes/pull/111137
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-09-21 20:01:39 +05:30
Kubernetes Prow Robot
299e65cdc5
Merge pull request #112613 from dims/update-github.com/go-openapi/jsonreference-to-drop-github.com/PuerkitoBio/purell
...
Update github.com/go-openapi/jsonreference to drop github.com/PuerkitoBio/purell
2022-09-21 07:15:26 -07:00
Kubernetes Prow Robot
b8e740f2e5
Merge pull request #112580 from shyamjvs/disable-compression
...
Add --disable-compression flag to kubectl
2022-09-21 07:15:14 -07:00
Kubernetes Prow Robot
8659bb4f5c
Merge pull request #112623 from jupblb/b245915126-2
...
Add timeout to kubemark cleanup commands
2022-09-21 04:20:54 -07:00
jupblb
e1eb924327
Add timeout to kubemark cleanup commands
...
The kubectl delete -f commands in stop-kubemark.sh may get stuck if the
cluster setup is removed concurrently. It is not important for these
commands to succeed so a timeout of 5m is set.
2022-09-21 11:26:20 +02:00
Kubernetes Prow Robot
6dbec8e255
Merge pull request #112120 from pohly/klog-flag-removal
...
logs: remove deprecated klog flags
2022-09-21 00:44:53 -07:00
Kubernetes Prow Robot
17c5066625
Merge pull request #112596 from chendave/data
...
kubeadm: try to reuse `RunData` if possible
2022-09-20 23:37:06 -07:00
Dave Chen
41b8536a50
kubeadm: try to reuse RunData
if possible
...
The generation of `RunData` for init and join is relative time consuming,
the data should be shared / reused whenever possible.
Signed-off-by: Dave Chen <dave.chen@arm.com>
2022-09-21 13:35:15 +08:00
Mengjiao Liu
5417fc236f
Update PreserveUnknownFields
field document link
2022-09-21 10:39:14 +08:00
Kubernetes Prow Robot
de693b5e2d
Merge pull request #112577 from andrewsykim/feature-gate-cleanup
...
Clean up feature gates ServiceLoadBalancerClass and ServiceLBNodePortControl
2022-09-20 18:13:12 -07:00
Davanum Srinivas
005a5ca081
update github.com/go-openapi/jsonreference to drop github.com/PuerkitoBio/purell
...
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-09-20 20:49:55 -04:00
Shyam Jeedigunta
b31301fa24
Integration test for kubectl --disable-compression flag
2022-09-20 16:09:52 -07:00
Kubernetes Release Robot
755da6051e
CHANGELOG: Update directory for v1.26.0-alpha.1 release
2022-09-20 19:21:35 +00:00
Aldo Culquicondor
524daa0a7d
Fix flaky TestStalePodDisruption
...
Change-Id: I3394caa54593b7e0206a2872cbdaafddd2fc47f8
2022-09-20 15:17:07 -04:00
Kubernetes Prow Robot
886b3cbc19
Merge pull request #112588 from pacoxu/fsnotify-v1.5.4
...
update fsnotify/fsnotify to v1.5.4
2022-09-20 12:07:16 -07:00
Kubernetes Prow Robot
9c9b29032f
Merge pull request #112589 from SataQiu/clean-featuregates-1.26
...
Remove GA featuregates IndexedJob and SuspendJob
2022-09-20 08:09:34 -07:00
Kubernetes Prow Robot
5e38528ef5
Merge pull request #110279 from sanposhiho/internal-cache
...
scheduler: Update cached Pod any time to make sure the Pod's status is up-to-date
2022-09-20 08:09:20 -07:00
Humble Chirammal
6621db7dd1
fix typos in pkg/validation and test/cmd
...
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-09-20 19:12:17 +05:30
Kubernetes Prow Robot
8ac009f66d
Merge pull request #112584 from dims/brneto-master
...
Bump github.com/spf13/cobra from 1.4.0 to 1.5.0
2022-09-20 05:03:20 -07:00
Davanum Srinivas
298b629e44
run pin-dependency.sh and then hack/update-vendor.sh
...
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2022-09-20 06:55:59 -04:00
Berchris Requiao
d81e6af218
Bump github.com/spf13/cobra from 1.4.0 to 1.5.0
2022-09-20 06:51:30 -04:00
Kubernetes Prow Robot
f0823c0f59
Merge pull request #112503 from pohly/e2e-framework-pod-polling
...
e2e framework: pod polling
2022-09-20 00:05:20 -07:00
Kubernetes Prow Robot
6ee3cbd931
Merge pull request #112556 from ardaguclu/patch-smp-error-msg
...
(kubectl patch): Add descriptive message when patch type is unsupported
2022-09-19 21:17:19 -07:00