ava-labs/avalanche-ops

Making ssh command run non-blocking

gyuho opened this issue · 1 comments

gyuho commented

for ssh_command in ssh_commands.iter() {
match ssh_command.run("tail -10 /var/log/cloud-init-output.log") {
Ok(output) => {
println!(
"{} (anchor node) init script std output:\n{}\n",
ssh_command.instance_id, output.stdout
);
println!(
"{} (anchor node) init script std err:\n{}\n",
ssh_command.instance_id, output.stderr
);
}
Err(e) => log::warn!("failed to run ssh command {}", e),

this can block forever if VPC security group has wrong IP for SSH 22 port ingress traffic.

We should either automatically fix the VPC security group or make this non-blocking (just warn after 10-second)

exdx commented

I believe the referenced PR addressed this particular issue and we can close?