-
Notifications
You must be signed in to change notification settings - Fork 39.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
etcd watcher: centralize error handling #32907
Conversation
bae6beb
to
c46d8f9
Compare
c46d8f9
to
5a4a095
Compare
@k8s-bot test this issue: #IGNORE |
no previous test result is found... |
GCE e2e build/test passed for commit 5a4a095. |
Can we move forward this? |
@wojtek-t Can you review this? |
@@ -109,6 +107,10 @@ func (wc *watchChan) run() { | |||
|
|||
select { | |||
case err := <-wc.errChan: | |||
if err == context.Canceled { | |||
wc.cancel() // just in case |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm slightly confused why you would cancel the context when it already came back as canceled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is sort of last defense line -- what if we get context.Canceled but wc.ctx
isn't canceled.
We want to make sure all goroutines in etcd3 watcher to stop regardlessly.
LGTM @hongchaodeng - I'm OOO this week - please don't expect any actions from me this week in general. |
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit 5a4a095. |
Automatic merge from submit-queue |
Removing label |
#31704-#32831-#32907-#33003-#33349-#31190-#33581-#34089-#34234-#32822-#33393-#34246-#34435-#32477-upstream-release-1.4 Automatic merge from submit-queue Automated cherry pick of #31189 #31704 #32831 #32907 #33003 #33349 #31190 #33581 #34089 #34234 #32822 #33393 #34246 #34435 #32477 upstream release 1.4 We are going to release etcd v3 in 1.4.x release. ``` Cherrypick etcd v3-related bug fixes to 1.4 branch ``` Those PRs include: - Updates of etcd Godeps - Update to pkg/storage/etcd directory - Two PR that were unnecessary to avoid conflicts: #31189 #31704 Automated cherry pick of #31189 #31704 #32831 #32907 #33003 #33349 #31190 #33581 #34089 #34234 #32822 #33393 #34246 #34435 #32477 @hongchaodeng @xiang90 @lavalamp @smarterclayton
Commit found in the "release-1.4" branch appears to be this PR. Removing the "cherrypick-candidate" label. If this is an error find help to get your PR picked. |
…ck-of-#31189-kubernetes#31704-kubernetes#32831-kubernetes#32907-kubernetes#33003-kubernetes#33349-kubernetes#31190-kubernetes#33581-kubernetes#34089-kubernetes#34234-kubernetes#32822-kubernetes#33393-kubernetes#34246-kubernetes#34435-kubernetes#32477-upstream-release-1.4 Automatic merge from submit-queue Automated cherry pick of kubernetes#31189 kubernetes#31704 kubernetes#32831 kubernetes#32907 kubernetes#33003 kubernetes#33349 kubernetes#31190 kubernetes#33581 kubernetes#34089 kubernetes#34234 kubernetes#32822 kubernetes#33393 kubernetes#34246 kubernetes#34435 kubernetes#32477 upstream release 1.4 We are going to release etcd v3 in 1.4.x release. ``` Cherrypick etcd v3-related bug fixes to 1.4 branch ``` Those PRs include: - Updates of etcd Godeps - Update to pkg/storage/etcd directory - Two PR that were unnecessary to avoid conflicts: kubernetes#31189 kubernetes#31704 Automated cherry pick of kubernetes#31189 kubernetes#31704 kubernetes#32831 kubernetes#32907 kubernetes#33003 kubernetes#33349 kubernetes#31190 kubernetes#33581 kubernetes#34089 kubernetes#34234 kubernetes#32822 kubernetes#33393 kubernetes#34246 kubernetes#34435 kubernetes#32477 @hongchaodeng @xiang90 @lavalamp @smarterclayton
We should centralize error handling in watcher in run(). Otherwise this could silently return.
Also we don't need the grpc code checking anymore. It's fixed.
This change is