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

bond device with wlp3s0 and enp0s25 breaks networking when rfkill on wireless is active #45738

Open
qknight opened this issue Aug 29, 2018 · 3 comments
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md

Comments

@qknight
Copy link
Member

qknight commented Aug 29, 2018

Issue description

behaviour i see

when i reboot my laptop and rfkill (the little switch on my thinkpad) is off then my booting is slightly delayed and networking will not work until i restart it manually:

# manually turning rfkill to _on_
systemctl restart network-link-wlp3s0.service
systemctl restart bond0-netdev.service

behaviour i want instead

  • if the wireless interface is off (rfkill on) then just ignore that and add the wireless interface wlp3s0 to the bond0 anyways.
  • at least start the bond0 with the enp0s25 interface attached

instead i see two systemd units fail and networking is not working until i correct it manually each time i forget to disable rfkill (set wireless to on).

debugging information

with rfkill active, i see:

 journalctl -u network-link-wlp3s0.service

Aug 29 11:17:38 lenovo-t530 systemd[1]: Starting Link configuration of wlp3s0...
Aug 29 11:17:38 lenovo-t530 lk3pyq4ad5wc2bk78q57viybf3z3ppkp-unit-script-network-link-wlp3s0-start[829]: Configuring link...
Aug 29 11:17:38 lenovo-t530 lk3pyq4ad5wc2bk78q57viybf3z3ppkp-unit-script-network-link-wlp3s0-start[829]: bringing up interface... RTNETLINK answers: Operation not possible due to RF-kill
Aug 29 11:17:38 lenovo-t530 lk3pyq4ad5wc2bk78q57viybf3z3ppkp-unit-script-network-link-wlp3s0-start[829]: failed
Aug 29 11:17:48 lenovo-t530 systemd[1]: network-link-wlp3s0.service: Main process exited, code=exited, status=1/FAILURE
Aug 29 11:17:48 lenovo-t530 systemd[1]: network-link-wlp3s0.service: Failed with result 'exit-code'.
Aug 29 11:17:48 lenovo-t530 systemd[1]: Failed to start Link configuration of wlp3s0.
journalctl -u bond0-netdev.service

Aug 29 11:17:48 lenovo-t530 systemd[1]: Starting Bond Interface bond0...
Aug 29 11:17:48 lenovo-t530 mmf4njf69kbahwwdv7llqzyqc3nw5h8g-unit-script-bond0-netdev-start[956]: Destroying old bond bond0...
Aug 29 11:17:48 lenovo-t530 mmf4njf69kbahwwdv7llqzyqc3nw5h8g-unit-script-bond0-netdev-start[956]: Creating new bond bond0...
Aug 29 11:17:48 lenovo-t530 mmf4njf69kbahwwdv7llqzyqc3nw5h8g-unit-script-bond0-netdev-start[956]: RTNETLINK answers: Operation not possible due to RF-kill
Aug 29 11:17:48 lenovo-t530 systemd[1]: bond0-netdev.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Aug 29 11:17:48 lenovo-t530 systemd[1]: bond0-netdev.service: Failed with result 'exit-code'.
Aug 29 11:17:48 lenovo-t530 systemd[1]: Failed to start Bond Interface bond0.

my configuration:

    interfaces.enp0s25.useDHCP = false;
    interfaces.wlp3s0.useDHCP = false;
    interfaces.bond0.useDHCP = true;

    bonds = {
      bond0 = {
        interfaces = [ "wlp3s0" "enp0s25" ];
        driverOptions = {
          mode = "active-backup";
          miimon = "100";
        };
      };
    };
systemctl cat bond0-netdev.service
# /nix/store/y9yg3wn7dqifp0k45qxxf9cv3bp75r0w-unit-bond0-netdev.service/bond0-netdev.service
[Unit]
After=network-pre.target sys-subsystem-net-devices-wlp3s0.device sys-subsystem-net-devices-enp0s25.device network-addresses-wlp3s0.service network-link-wlp3s0.service network-addresses-enp0s25.ser>
Before=network-setup.service
BindsTo=sys-subsystem-net-devices-wlp3s0.device sys-subsystem-net-devices-enp0s25.device
Description=Bond Interface bond0
PartOf=network-setup.service

[Service]
Environment="LOCALE_ARCHIVE=/nix/store/c228yaf0lpwz2b9w5cz6jqqf7wmn6lq3-glibc-locales-2.27/lib/locale/locale-archive"
Environment="PATH=/nix/store/ki6m84lssq5kzawabykg7p8qrk076m02-iproute2-4.17.0/bin:/nix/store/8q6dp79rygy5layib2k0l71n64jbmd78-gawk-4.2.1/bin:/nix/store/bgii6n1si6za1ry0vbwnmiapzagcyrjm-coreutils-8>
Environment="TZDIR=/nix/store/1739slb02r1mb60q4648ajbdms52yvnr-tzdata-2018e/share/zoneinfo"



ExecStart=/nix/store/mmf4njf69kbahwwdv7llqzyqc3nw5h8g-unit-script-bond0-netdev-start 
ExecStopPost=/nix/store/jb6f5a843w3m9q7p0dp0dngbhr1fl9g4-unit-script-bond0-netdev-post-stop
RemainAfterExit=true
Type=oneshot

systemctl cat network-link-wlp3s0.service
# /nix/store/mm14sb4yn2p93b3fpz2n4mzzh6aimjvg-unit-network-link-wlp3s0.service/network-link-wlp3s0.service
[Unit]
After=network-pre.target sys-subsystem-net-devices-wlp3s0.device
Before=network-interfaces.target
BindsTo=sys-subsystem-net-devices-wlp3s0.device
Description=Link configuration of wlp3s0

[Service]
Environment="LOCALE_ARCHIVE=/nix/store/c228yaf0lpwz2b9w5cz6jqqf7wmn6lq3-glibc-locales-2.27/lib/locale/locale-archive"
Environment="PATH=/nix/store/ki6m84lssq5kzawabykg7p8qrk076m02-iproute2-4.17.0/bin:/nix/store/bgii6n1si6za1ry0vbwnmiapzagcyrjm-coreutils-8.29/bin:/nix/store/hm91iaffdsq7gihqd75ax4wqqbk7mmzh-finduti>
Environment="TZDIR=/nix/store/1739slb02r1mb60q4648ajbdms52yvnr-tzdata-2018e/share/zoneinfo"



ExecStart=/nix/store/lk3pyq4ad5wc2bk78q57viybf3z3ppkp-unit-script-network-link-wlp3s0-start 
RemainAfterExit=true
Type=oneshot


Technical details

nix-info -m
warning: Nix search path entry '$HOME/.nix-defexpr/channels' does not exist, ignoring
 - system: `"x86_64-linux"`
 - host os: `Linux 4.14.62, NixOS, 18.09.4af9ee4-nixcloud_c34f201 (Jellyfish)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.0.4`
 - channels(root): `"nixos-18.09pre148985.4af9ee49f1e"`
 - channels(joachim): `""`
warning: Nix search path entry '$HOME/.nix-defexpr/channels' does not exist, ignoring
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
@Mic92
Copy link
Member

Mic92 commented Aug 30, 2018

For the moment networkd might not have this issue. For the networking script hackery I don't know if we can consider all those cases.

@qknight
Copy link
Member Author

qknight commented Sep 6, 2018

@Mic92 all those cases? you mean the 'rfkill'?

@stale
Copy link

stale bot commented Jun 3, 2020

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Projects
None yet
Development

No branches or pull requests

2 participants