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

nixos/network: remove 99-main.network #71790

Merged
merged 1 commit into from Oct 23, 2019

Conversation

flokli
Copy link
Contributor

@flokli flokli commented Oct 23, 2019

Just maching all network interfaces caused many breakages, see #18962
and #71106.

We already don't support the global networking.useDHCP,
networking.defaultGateway(6) options if networking.useNetworkd is
enabled, but direct users to configure the per-device
networking.interfaces.<name?>.… options.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.
Notify maintainers

cc @

Just maching all network interfaces caused many breakages, see NixOS#18962
and NixOS#71106.

We already don't support the global networking.useDHCP,
networking.defaultGateway(6) options if networking.useNetworkd is
enabled, but direct users to configure the per-device
networking.interfaces.<name?>.… options.
@andir
Copy link
Member

andir commented Oct 23, 2019

@GrahamcOfBorg test networking.networkd networking.scripted

Copy link
Member

@fpletz fpletz left a comment

Choose a reason for hiding this comment

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

👍 in principle, but networking.nameservers will also cease to work. You might want to add that to the release notes.

Also, shouldn't we add assertions to make the use of these options eval errors like networking.useDHCP instead of silently disregarding them?

@flokli
Copy link
Contributor Author

flokli commented Oct 23, 2019

👍 in principle, but networking.nameservers will also cease to work. You might want to add that to the release notes.

networking.nameservers should still work, because enabling networkd also enables resolved, and inside there, we write /etc/systemd/resolved.conf configuring the global nameservers.

Also, shouldn't we add assertions to make the use of these options eval errors like networking.useDHCP instead of silently disregarding them?

We already had assertions about global useDHCP, defaultGateway, defaultGateway6 when useNetworkd is set to true - or was that in the context of the nameserver options?

Copy link
Member

@fpletz fpletz left a comment

Choose a reason for hiding this comment

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

Thanks, I wasn't aware the assertions were already in place (but apparently are since 2017) and that configuration bit for resolved. In that case: 👍

@flokli
Copy link
Contributor Author

flokli commented Oct 23, 2019

I'm not sure about the state of tests.networking.networkd.

ofborg status suggests it passed on aarch64 (but no logs available, so this might be a bug).

It didn't even start on x86_64-linux, so I tried building it locall.

It seems the virtual test fails when trying to run systemctl stop network-addresses-tap0 (which makes sense, because that unit only exists in scripted, right?).

I don't believe this PR broke it, but it was already broken before, at least it broke here while building locally.

cc @fpletz @grahamc

@globin
Copy link
Member

globin commented Oct 23, 2019

The virtual test had never worked. I just added the useNetworkd = networkd in the useDHCP change, previously the test was always run with scripted network. Like this it's at least explicit that it needs fixing, this is not necessary for this PR. The rest of the networkd tests worked previously, so should still work with this change.

@arianvp
Copy link
Member

arianvp commented Oct 23, 2019

This will break: networking.defaultGateway , network.defaultGateway6 ,networking.search and networking.domain. I dont think it makes sense to have the default gateway shared for all interfaces, so I would prefer to just deprecate this option? I'm not sure when it would ever not be buggy in the case of having more than one interface on a machine

Edit: nvm just read your comment we already have assertions for this

@flokli flokli merged commit 4c4e24e into NixOS:master Oct 23, 2019
@flokli flokli deleted the networkd-remove-99-main branch October 23, 2019 13:13
@flokli
Copy link
Contributor Author

flokli commented Oct 23, 2019

Okay, then let's merge this in, and fix the virtual test later if it wasn't broken by this PR.

@flokli
Copy link
Contributor Author

flokli commented Oct 24, 2019

Another perk: NetworkManager can now configure resolved with the actual DNS servers, as the corresponding interfaces aren't managed anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants