-
Notifications
You must be signed in to change notification settings - Fork 494
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
[1.25] state: restart leadership worker if it fails #8046
Conversation
Run the leadership manager in a worker.Runner, restarting it if it fails. The methods on State for returning leadership claimers and checkers defer obtaining the current worker until the claim/check methods are invoked, to avoid pinning to broken workers.
|
Status: merge request accepted. Url: http://ci.jujucharms.com/job/github-merge-juju |
@@ -177,6 +178,9 @@ func (client *client) ExpireLease(name string) error { | |||
// Refresh is part of the Client interface. | |||
func (client *client) Refresh() error { | |||
client.logger.Tracef("refreshing") | |||
if wrench.IsActive("lease", "refresh") { |
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 leads to a lot of DEBUG level complaints about wrench directory not existing.
Is it worth the effort to add it?
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.
Worth the effort to add what? We can remove it, but it seems to me the right thing to do is change wrench to use the TRACE level.
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 agree with @axw on that point.
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.
@axw care to do a simple follow up branch that moves the wrench package Debug statements to Trace?
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.
yup, will do today
Description of change
Run the leadership manager in a worker.Runner,
restarting it if it fails. The methods on State
for returning leadership claimers and checkers
defer obtaining the current worker until the
claim/check methods are invoked, to avoid
pinning to broken workers.
QA steps
(wait)
(observe leadership manager failures in log)
(observe some time later that the leadership manager is restarted)
Documentation changes
None.
Bug reference
https://bugs.launchpad.net/juju-core/+bug/1729930