Skip to content

add --skip-offline - #370

Open
jaspinegz wants to merge 3 commits into
serokell:masterfrom
jaspinegz:dcurgz/add-skip-offline
Open

jaspinegz wants to merge 3 commits into
serokell:masterfrom
jaspinegz:dcurgz/add-skip-offline

Conversation

@jaspinegz

Copy link
Copy Markdown

Add a new option, --skip-offline, which partially addresses #221.

If provided the CLI flag will attempt an SSH connection to each remote host in the deploy configuration. If an SSH connection cannot be established (5 second timeout) to a given host, the host is skipped.

Comment thread src/cli.rs
Comment on lines +559 to +567
let ssh_command_status = Command::new("ssh")
.arg("-q")
.arg("-o ConnectTimeout=5")
.arg(format!("ssh://{}@{}", deploy_defs.ssh_user, deploy_data.node.node_settings.hostname))
.arg("exit")
.stdout(Stdio::null())
.status()
.await
.unwrap();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Do we want to consider keeping the ssh connection alive and re-using it for the deployment? In case the connections is flakey and some connection attempts fail. Since it could still result in hosts not being reachable during deployment...

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.

2 participants