Skip to content

Commit 8092fa1

Browse files
committed
Extend the retry backoff for machine ssh scp
In a real world scenario, this will work in the first iteration (maybe the second after 2sec backoff), however the github workers are particularly slow so extending this to make the tests pass.
1 parent 57b27a7 commit 8092fa1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

juju/machine.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ async def _scp(self, source, destination, scp_opts):
141141
# couple of times until either we run out of attempts, or the ssh command succeeds to
142142
# mitigate that effect.
143143
# TODO (cderici): refactor the ssh and scp subcommand processing into a single method.
144-
retry_backoff = 1
144+
retry_backoff = 2
145145
retries = 10
146146
for _ in range(retries):
147147
process = await jasyncio.create_subprocess_exec(*cmd)
@@ -185,7 +185,7 @@ async def ssh(
185185
# service is up and listening, which creates a race for the ssh command. So we retry a
186186
# couple of times until either we run out of attempts, or the ssh command succeeds to
187187
# mitigate that effect.
188-
retry_backoff = 1
188+
retry_backoff = 2
189189
retries = 10
190190
for _ in range(retries):
191191
process = await jasyncio.create_subprocess_exec(

0 commit comments

Comments
 (0)