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/networkmanager: fix merging options #72916

Merged
merged 1 commit into from Nov 6, 2019

Conversation

jtojnar
Copy link
Contributor

@jtojnar jtojnar commented Nov 6, 2019

Incorrect merging of modules in #64364 resulted in dhcpcd being enabled causing flaky network connection.

Fixing it uncovered an infinite recursion from the same commit, previously masked by the incorrect merge.

We can just drop the mkDefault for networking.wireless.enable as it is already false by default.

Closes: #72416

cc @laikq, @alexeymuranov (reporters), @JohnAZoidberg (cause of breakage), @worldofpeace (backporter)

Copy link
Member

@kamilchm kamilchm left a comment

Choose a reason for hiding this comment

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

I get an infinite recursion after cherry-picking onto nixos-unstable:

error: while evaluating the attribute 'config.system.build.toplevel' at nixos/modules/system/activation/top-level.nix:274:5:
while evaluating 'foldr' at lib/lists.nix:52:20, called from nixos/modules/system/activation/top-level.nix:138:12:
while evaluating 'fold'' at lib/lists.nix:55:15, called from lib/lists.nix:59:8:
while evaluating the attribute 'assertions' at undefined position:
while evaluating anonymous function at lib/modules.nix:75:45, called from undefined position:
while evaluating the attribute 'value' at lib/modules.nix:336:9:
while evaluating the option `assertions':
while evaluating the attribute 'isDefined' at lib/modules.nix:373:5:
while evaluating the attribute 'values' at lib/modules.nix:362:9:
while evaluating the attribute 'values' at lib/modules.nix:456:7:
while evaluating anonymous function at lib/modules.nix:348:28, called from lib/modules.nix:348:17:
while evaluating 'dischargeProperties' at lib/modules.nix:415:25, called from lib/modules.nix:349:62:
while evaluating the attribute 'condition' at lib/modules.nix:500:14:
while evaluating the attribute 'condition' at lib/modules.nix:500:14:
while evaluating the attribute 'enable' at undefined position:
while evaluating anonymous function at lib/modules.nix:75:45, called from undefined position:
while evaluating the attribute 'value' at lib/modules.nix:336:9:
while evaluating the option `networking.wireless.enable':
while evaluating the attribute 'isDefined' at lib/modules.nix:373:5:
while evaluating the attribute 'values' at lib/modules.nix:362:9:
while evaluating the attribute 'values' at lib/modules.nix:456:7:
while evaluating anonymous function at lib/modules.nix:348:28, called from lib/modules.nix:348:17:
while evaluating 'dischargeProperties' at lib/modules.nix:415:25, called from lib/modules.nix:349:62:
while evaluating 'dischargeProperties' at lib/modules.nix:415:25, called from lib/modules.nix:421:11:
while evaluating the attribute 'condition' at lib/modules.nix:500:14:
while evaluating the attribute 'condition' at lib/modules.nix:500:14:
while evaluating the attribute 'condition' at lib/modules.nix:500:14:
while evaluating the attribute 'networking.wireless.enable' at undefined position:
while evaluating anonymous function at lib/modules.nix:75:45, called from undefined position:
while evaluating the attribute 'value' at lib/modules.nix:336:9:
infinite recursion encountered, at lib/modules.nix:336:9

Incorrect merging of modules resulted in dhcpcd being enabled causing flaky network connection.

NixOS#64364

Fixing it uncovered an infinite recursion from the same commit, previously masked by the incorrect merge.

We can just drop the `mkDefault` for `networking.wireless.enable` as it is already `false` by default.

Closes: NixOS#72416
@jtojnar jtojnar added the 9.needs: port to stable A PR needs a backport to the stable release. label Nov 6, 2019
Copy link
Member

@kamilchm kamilchm left a comment

Choose a reason for hiding this comment

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

stopping the following units: dhcpcd.service 👍

Copy link
Member

@infinisil infinisil left a comment

Choose a reason for hiding this comment

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

Looks good to me, the inf rec resolution of removing the wireless.enable = false also makes sense after thinking about it.

@JohnAZoidberg
Copy link
Member

aha! Yes, I've been having some problems and had to manually stop dhcpcd when using NetworkManager. But since that problem only appeared after the iwd changes were merged, I assumed the problem must lie somewhere else.

@infinisil
Copy link
Member

I'm brewing up some changes to the module system such that this can't happen anymore

@infinisil infinisil merged commit d34194b into NixOS:master Nov 6, 2019
@worldofpeace worldofpeace deleted the nm-prope-merge branch November 6, 2019 22:54
@alexeymuranov
Copy link
Contributor

[needs: port to stable] can be removed, i suppose.

It is hard to see what actually needs port to stable...

@infinisil infinisil removed the 9.needs: port to stable A PR needs a backport to the stable release. label Nov 10, 2019
@jtojnar
Copy link
Contributor Author

jtojnar commented Nov 10, 2019

Sorry, forgot to mention. It was backported in #72951

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.

dhcpcd service mysteriously starting after NixOS 19.03 -> 19.09 update
6 participants