mirror of
https://codeberg.org/spire/dispenser.git
synced 2026-06-03 18:14:06 +02:00
more ssh waiting
This commit is contained in:
parent
9e9d8a364f
commit
09e10fd8ce
1 changed files with 4 additions and 3 deletions
|
|
@ -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");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue