Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FEATURE: add fallback hostnames #230

Open
crabdancing opened this issue Sep 3, 2023 · 2 comments
Open

FEATURE: add fallback hostnames #230

crabdancing opened this issue Sep 3, 2023 · 2 comments

Comments

@crabdancing
Copy link

Computer networks are, in the real world, often messy. I've found that a given machine might be connected to ethernet, or to wifi, under a different IP address & hostname. Since wifi is much slower on my network, it's significantly preferable to default to ethernet, and failover to trying to connect over wifi.

Having something like a --failover-hostnames [HOSTNAMES] option, that would try to connect in a fixed sequence at the pushing step, would make it much easier to script for cases like this (without, e.g., forcing an unnecessary re-evaluation of the entire nix expression each time).

Another use case where this would help make deploy-rs more useful: If you want a failover to pushing updates over a reverse SSH tunnel (e.g., the machine is outside of the normal network, but still needs centrally controlled updates).

@notgne2
Copy link
Contributor

notgne2 commented Sep 4, 2023

I would think of this as mildly out of scope (and something that you can solve at the network level with things like Tailscale), but this would help reduce the reasons to disable magic-rollback too. This should make it possible to do things like connect to your machine over IP, alter configuration that changes the IP, and have magic-rollback still able to confirm the deployment (by adding the new hostname or IP to the failover hostnames).

I think it might make more sense to just replace hostname with hostnames (add compat and a deprecation notice), no reason to treat failovers as second class really, we can just have them all in one list and try them in order.

@crabdancing
Copy link
Author

Fair enough! Having multiple hostnames per machine in the schema seems sensible. :)

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

No branches or pull requests

2 participants