Skip to content

Conversation

brb
Copy link
Member

@brb brb commented May 11, 2020

Previously, DeleteEndpoints() invocation might have sent DeleteService
event (handled by pkg/k8s/watcher), if a service didn't have any endpoint
left. This led to a double removal of the service in pkg/service, as
kube-apiserver sends a dedicated Service object removal update, which
is handled by DeleteService() which sends DeleteService event.

This triggered "service not found" warning msg.

To fix this, send UpdateService event instead of DeleteService from
deleteEndpoints(), which would trigger only update in svc backends.
The removal of a service is handled by a separate event anyways.

Fix #11399

Previously, DeleteEndpoints() invocation might have sent DeleteService
event (handled by pkg/k8s/watcher), if a service didn't have any endpoint
left. This led to a double removal of the service in pkg/service, as
kube-apiserver sends a dedicated Service object removal update, which
is handled by DeleteService() which sends DeleteService event.

This triggered "service not found" warning msg.

To fix this, send UpdateService event instead of DeleteService from
deleteEndpoints(), which would trigger only update in svc backends.
The removal of a service is handled by a separate event anyways.

Signed-off-by: Martynas Pumputis <m@lambda.lt>
@brb brb added kind/bug This is a bug in the Cilium logic. area/k8s Impacts the kubernetes API, or kubernetes -> cilium internals translation layers. release-note/bug This PR fixes an issue in a previous release of Cilium. needs-backport/1.6 labels May 11, 2020
@brb brb requested review from a team and aanm May 11, 2020 13:21
@brb
Copy link
Member Author

brb commented May 11, 2020

test-me-please

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.007%) to 37.878% when pulling 26fdcad on pr/brb/fix-svc-not-found into fb8481a on master.

@brb brb requested a review from aanm May 11, 2020 15:37
@brb
Copy link
Member Author

brb commented May 11, 2020

CI hit #10763.

@brb
Copy link
Member Author

brb commented May 11, 2020

retest-net-next

@maintainer-s-little-helper maintainer-s-little-helper bot added the ready-to-merge This PR has passed all tests and received consensus from code owners to merge. label May 11, 2020
@gandro gandro merged commit 69849ee into master May 12, 2020
@gandro gandro deleted the pr/brb/fix-svc-not-found branch May 12, 2020 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/k8s Impacts the kubernetes API, or kubernetes -> cilium internals translation layers. kind/bug This is a bug in the Cilium logic. ready-to-merge This PR has passed all tests and received consensus from code owners to merge. release-note/bug This PR fixes an issue in a previous release of Cilium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"service not found" warnings
8 participants