-
-
Notifications
You must be signed in to change notification settings - Fork 366
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
nixops deploy kills the network connection #640
Comments
I've seen this as well, but in my case the network did come back up eventually. I thought the obvious solution is to set |
This reduces the time window during which IP addresses are gone during switch-to-configuration. A complication is that with stopIfChanged = true, preStop would try to delete the *new* IP addresses rather than the old one (since the preStop script now runs after the switch to the new configuration). So we now record the actually configured addresses in /run/nixos/network/addresses/<interface>. This is more robust in any case. Issue NixOS/nixops#640.
@nh2 this might be the problem you talked about during NixCon2017. |
@groxxda, just FYI we (@aszlig, @nh2, @domenkozar, @fpletz and me) are currently investigating this issue at the NixCon 2017 hackathon. We have a suspicion the problem is that the I think the desired behavior is that Note that a simple reboot of the machine makes it boot without problems. We're working on a fix. |
Here's a user story to describe in detail how things can break:
|
@nh2 cherry-picked on release-17.03: https://github.com/LumiGuide/nixpkgs/tree/fix-network-setup-release-17.03 |
Reverse the PartOf dependency between network-setup and network-addresses-* This was joint work of: @nh2, @domenkozar, @fpletz, @aszlig and @basvandijk at the NixCon 2017 hackathon.
Reverse the PartOf dependency between network-setup and network-addresses-* This was joint work of: @nh2, @domenkozar, @fpletz, @aszlig and @basvandijk at the NixCon 2017 hackathon.
Reverse the PartOf dependency between network-setup and network-addresses-* This was joint work of: @nh2, @domenkozar, @fpletz, @aszlig and @basvandijk at the NixCon 2017 hackathon.
Reverse the PartOf dependency between network-setup and network-addresses-* This was joint work of: @nh2, @domenkozar, @fpletz, @aszlig and @basvandijk at the NixCon 2017 hackathon.
Reverse the PartOf dependency between network-setup and network-addresses-* This was joint work of: @nh2, @domenkozar, @fpletz, @aszlig and @basvandijk at the NixCon 2017 hackathon.
Reverse the PartOf dependency between network-setup and network-addresses-* This was joint work of: @nh2, @domenkozar, @fpletz, @aszlig and @basvandijk at the NixCon 2017 hackathon.
Reverse the PartOf dependency between network-setup and network-addresses-* This was joint work of: @nh2, @domenkozar, @fpletz, @aszlig and @basvandijk at the NixCon 2017 hackathon.
I've had the following problem for as long as I have been using nixops (~3 years) but never took the time to report it since I had an acceptable work around. However since this is a serious issue that other people can run into I would like to report it now and work towards a diagnosis and a fix.
Almost everytime I perform a significant nixpkgs upgrade (for example I just upgraded my
nixos-17.03-small
with the following changes: NixOS/nixpkgs-channels@8183006...6018464) and deploy to one of my machines on Hetzner using nixops I get the following:Note that the network related services are stopped. This is probably because the systemd unit files have been changed. However after the network has been stopped nixops presumably lost the SSH connection it had to
mymachine
because it will just hang (I have waited for at least a minute). I have to interrupt nixops using Ctrl-C.Since the network is down production services on
mymachine
become unreachable from the network. Fortunately our service can tolerate a bit of downtime but I can imagine not everybody can.The way I currently "solve" it is to reboot
mymachine
from the Hetzner web interface. This is clearly a hack and not a real solution.Some additional information that may or may not have anything to do with it:
mymachine
configures some fixed addresses (networking.interfaces.eth0.ip4 = [ ... ]
as well as some local networking commands (networking.localCommands = "..."
).I guess the problem is somewhere in this if-then-else block in switch-to-configuration.pl.
@edolstra any idea why this is happening?
The text was updated successfully, but these errors were encountered: