Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Handle PingBatcher getting restarted (bug #1703526) #7626
Conversation
jameinel
added some commits
Jul 11, 2017
jameinel
changed the title from
Possible fix for 1703526.
to
Handle PingBatcher getting restarted (bug #1703526)
Jul 11, 2017
|
There were a couple of bugs in my patch (u.globalAgentKey() is equivalent to m.globalKey(), while u.globalKey is actually the #charm key). |
wupeka
approved these changes
Jul 11, 2017
I'd add a test that checks what happens when PingBatcher dies, other than that LGTM.
|
$$merge$$ |
|
Status: merge request accepted. Url: http://juju-ci.vapour.ws:8080/job/github-merge-juju |
jujubot
merged commit 78ed638
into
juju:2.2
Jul 11, 2017
1 check passed
|
I've built a snap for this change and upgraded a controller. Let's see if the issue reproduces after a while. I will post more info tomorrow as it takes time to reproduce. |
|
I can confirm that this change has fixed the issue both with a self-built snap and in the official 2.2.2 snap. |
jameinel commentedJul 11, 2017
•
Edited 1 time
-
jameinel
Jul 11, 2017
Description of change
Instead of fixing a PingBatcher when initializing a Pinger,
we instead have the pinger ask for whatever the current PingBatcher is.
That way if the PingBatcher gets restarted due to an error, then the
Pingers can find the correct one.
Only other problem is we probably don't restart the Pingers either if
they encounter an error, so that needs testing as well.
Also, we're missing a test for the fact that Pinger's always use the
fresh PingBatcher (they do by inspection, but it should be actually tested.)
QA steps
I did manage to QA this by injecting bad data, seeing PingBatcher die, seeing some agents show up as down, but see everything recover afterward.
Without this patch, everything stays dead after injecting bad data.
Documentation changes
Just fixes a bug.
Bug reference
https://bugs.launchpad.net/juju/+bug/1703526