Skip to content

Fix race in EtcdWatcher #18956

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

Merged
merged 1 commit into from
Dec 22, 2015
Merged

Conversation

wojtek-t
Copy link
Member

@k8s-github-robot
Copy link

Labelling this PR as size/S

@k8s-github-robot k8s-github-robot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Dec 21, 2015
@k8s-bot
Copy link

k8s-bot commented Dec 21, 2015

GCE e2e test build/test passed for commit 8573ef0cfb861abe9e38f84e663010cd1813d4dc.

@wojtek-t
Copy link
Member Author

It will not fix the OIDC test - this one just failed.

@k8s-bot unit test this please

@wojtek-t
Copy link
Member Author

@kubernetes/goog-testing

@wojtek-t
Copy link
Member Author

@krousey @caesarxuchao - can one of you please take a look?


// We need to be prepared, that Stop() can be called at any time.
// It can potentially also be called, even before this function is called.
// If that is the case, we simply skip all the code here.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be a good idea to link to the issue numbers in the comments.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

@timothysc
Copy link
Member

Minor comments, but I've still never repo'd locally. It would be good to list down the reproduction conditions.

@wojtek-t
Copy link
Member Author

I also didn't repro'd it locally. This is just based on my intuition and some logs.

@k8s-bot
Copy link

k8s-bot commented Dec 21, 2015

GCE e2e test build/test passed for commit 327aa94df805aa3d0dcf04715cc6fe8568fbc13c.

w.stopLock.Lock()
if w.stopped {
// Watcher has already been stopped - don't event initiate it here.
w.stopLock.Unlock()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use an anonymous function or a separate function to encapsulate this logic before the infinite for loop so you can just defer Unlock? I'd hate for someone to come add another error condition with an early return and forget to unlock.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@wojtek-t
Copy link
Member Author

@krousey - PTAL

@krousey krousey assigned krousey and unassigned timothysc Dec 21, 2015
@krousey krousey added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 21, 2015
@wojtek-t
Copy link
Member Author

@krousey - thanks!

@k8s-github-robot
Copy link

Labelling this PR as size/M

@k8s-github-robot k8s-github-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Dec 21, 2015
@k8s-bot
Copy link

k8s-bot commented Dec 21, 2015

GCE e2e test build/test passed for commit 6297232.

@wojtek-t
Copy link
Member Author

Merging manually to check if that helps.

wojtek-t added a commit that referenced this pull request Dec 22, 2015
@wojtek-t wojtek-t merged commit 0cdd2ab into kubernetes:master Dec 22, 2015
@wojtek-t wojtek-t deleted the debug_etcd_generic branch December 28, 2015 10:41
openshift-publish-robot pushed a commit to openshift/kubernetes that referenced this pull request Mar 23, 2018
Automatic merge from submit-queue.

 make registry installation a component

Demonstrate a simple way of making a component and installing it.  This builds on previous pulls and shows how we can start define an interface.

I think after we switch pieces over, we'll find points of commonality as their entry points.  I suspect they will include:
 1. cluster-admin.kubeconfig
 2. docker helper? We should try to switch this to actually installing with pods.
 3. uninstall API.  Something to remove it anyway.
 4. idempotent.  We will call it *on every cluster up*

/assign @mfojtik
/assign @soltysh

Origin-commit: eb016b358623b0d6c672ba1c3cfcfa1b20f1970b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants