Skip to content

pycloudlib: increase a variety of retry frequencies#115

Merged
OddBloke merged 4 commits into
canonical:masterfrom
OddBloke:retries
Feb 16, 2021
Merged

pycloudlib: increase a variety of retry frequencies#115
OddBloke merged 4 commits into
canonical:masterfrom
OddBloke:retries

Conversation

@OddBloke
Copy link
Copy Markdown
Contributor

@OddBloke OddBloke commented Feb 5, 2021

When investigating the relative performance of execution methods for #114, I found that a lot of our slow launch speeds were due to long sleeps between retries. This PR tweaks a variety of them, and fixes #111 as well.

Copy link
Copy Markdown
Contributor

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

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

Thanks!

The previous implementation assumed that `client.connect` would take ~no
time.  This isn't the case, it will sometimes block for 10s of seconds,
which meant that the "10 minute" wait could sometimes be substantially
longer than that.
`self.execute` generally fails the first time it's executed, but will
often succeed much sooner than 10s after: reducing the interval between
attempts reduces the time we wait for boot of instances.
LXD instances are very unlikely to have an IP address when we first
launch them, but they generally gain an IP address much earlier than 20s
after boot.  Reducing this interval substantially speeds up booting LXD
instances accessed via SSH.
@OddBloke OddBloke merged commit 3a6c668 into canonical:master Feb 16, 2021
@OddBloke OddBloke deleted the retries branch February 16, 2021 21:01
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.

SSH connection retrying can take significantly longer than the apparent 10 minutes

2 participants