Fix two agent wedgies. #8089

Merged
merged 1 commit into from Nov 16, 2017

Conversation

Projects
None yet
3 participants
Owner

howbazaar commented Nov 16, 2017

Fixes two places where agents can get wedged, which stops the agents from restarting.

First, the apicaller can get itself into a situation where it is waiting forever for a login response.
Secondly, the logsender can get itself stuck waiting for the websocket to be initialized.

This bug adds a timeout to the first, and handles the second by getting the LogSender in another goroutine and also waiting on the stop channel.

QA steps

Unit tests continue to work, and CI passes. Nothing spectacular.

Bug reference

https://bugs.launchpad.net/juju/+bug/1732588
https://bugs.launchpad.net/juju/+bug/1732587

+ // If the server is rate limiting, it will normally pause
+ // before responding to the login request, but the pause is
+ // in the realm of five to ten seconds.
+ Timeout: time.Minute,
@wallyworld

wallyworld Nov 16, 2017

Owner

Could we rename this to LoginTimeout?
So we have DialTimeout and LoginTimeout. Much clearer IMHO

@howbazaar

howbazaar Nov 16, 2017

Owner

Perhaps in another branch, but this change should be small in case we want to backport.

I think we can improve the select{} bits

Owner

howbazaar commented Nov 16, 2017

$$merge$$

Contributor

jujubot commented Nov 16, 2017

Status: merge request accepted. Url: http://ci.jujucharms.com/job/github-merge-juju

@jujubot jujubot merged commit 93f6f62 into juju:develop Nov 16, 2017

1 check passed

continuous-integration/jenkins/pr-merge This commit looks good
Details

@howbazaar howbazaar deleted the howbazaar:fix-agent-wedgies branch Nov 16, 2017

@howbazaar howbazaar referenced this pull request Dec 13, 2017

Merged

Fix two agent wedgies. #8219

jujubot added a commit that referenced this pull request Dec 13, 2017

Merge pull request #8219 from howbazaar/2.2-stuck-agent-fixes
Fix two agent wedgies.

Backport of PR #8089
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment