Skip to content
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

Add leader election. #48

Merged
merged 1 commit into from
May 14, 2018
Merged

Conversation

jsafrane
Copy link
Contributor

@jsafrane jsafrane commented May 4, 2018

External attacher can now run in Deployments. One attacher per driver is active, others are standby to simplify the implementation.

It must be explicitly enabled - it needs namespace for a config map where the leader election is stored.

Fixes: #46

External attacher can now run in Deployments. One attacher per driver is
active, others are standby to simplify the implementation.

It must be explicitly enabled - it needs namespace for a config map where the
leader election is stored.
@jsafrane jsafrane force-pushed the leader-election branch 2 times, most recently from 16777de to 58bdbaf Compare May 4, 2018 15:22
},
OnStoppedLeading: func() {
glog.Error("Stopped leading")
os.Exit(1)
Copy link
Member

Choose a reason for hiding this comment

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

This leader election code is new to me. Why quit and kill the program which will restart the container which may look like many errors to users. Is there another way to just go back into waiting?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There is, but the fact that leader lost its leadership means that something really bad happened to the leader (or API server) - it was not able to update an API object for 30 seconds.

Kubernetes controller-manager dies too:

https://github.com/jsafrane/kubernetes/blob/master/cmd/kube-controller-manager/app/controllermanager.go#L211

Copy link
Member

Choose a reason for hiding this comment

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

Cool 👍

@lpabon lpabon merged commit 53fe5da into kubernetes-csi:master May 14, 2018
jsafrane pushed a commit to jsafrane/external-attacher that referenced this pull request Jul 21, 2023
…cy-openshift-4.13-csi-attacher

Updating csi-attacher images to be consistent with ART
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants