more ssh waiting

This commit is contained in:
Robin Appelman 2023-03-09 23:19:37 +01:00
commit 09e10fd8ce

View file

@ -378,7 +378,7 @@ async fn connect_ssh(ip: IpAddr, auth: &CreatedAuth) -> Result<SshSession, Error
loop { loop {
tries += 1; tries += 1;
sleep(Duration::from_secs(2)).await; sleep(Duration::from_secs(5)).await;
match SshSession::open(ip, &auth).await { match SshSession::open(ip, &auth).await {
Ok(ssh) => { Ok(ssh) => {
@ -387,12 +387,13 @@ async fn connect_ssh(ip: IpAddr, auth: &CreatedAuth) -> Result<SshSession, Error
Err(e) if tries > 5 => { Err(e) if tries > 5 => {
error!( error!(
tries = tries, tries = tries,
error = %e,
"Failed to connect to ssh to many times, giving up" "Failed to connect to ssh to many times, giving up"
); );
return Err(e.into()); return Err(e.into());
} }
Err(_) => { Err(e) => {
error!(tries = tries, "Failed to connect to ssh"); warn!(tries = tries, error = %e, "Failed to connect to ssh");
} }
} }
} }