opened
datafoo
username_0
**Describe the bug**

The following warning logs are produced in my server.

```
# journalctl SYSLOG_IDENTIFIER=systemd-udevd -S "11:17:35" -p4
-- Logs begin at Fri 2020-01-31 09:26:25 UTC, end at Mon 2020-05-04 11:41:06 UTC. --
May 04 11:17:35 myhostname systemd-udevd[1025]: eth0: Process '/nix/store/kgp3vq8l9yb8mzghbw83kyr3f26yqvsz-bash-4.4-p23/bin/sh -c 'echo 2 > /proc/sys/net/ipv6/conf/eth0/use_tempaddr'' failed with exit code 1.
May 04 11:17:35 myhostname systemd-udevd[1021]: eth1: Process '/nix/store/kgp3vq8l9yb8mzghbw83kyr3f26yqvsz-bash-4.4-p23/bin/sh -c 'echo 2 > /proc/sys/net/ipv6/conf/eth1/use_tempaddr'' failed with exit code 1.
```

**To Reproduce**
Steps to reproduce the behavior:
1. Boot a NixOS server

**Expected behavior**
No warning should be logged.

**Additional context**
It should be noted the interfaces of my server are named `eno1` and `eno2` and not `eth0` and `eth1` as referred to in the warning logs.

**Notify maintainers**
@username_1 

**Metadata**
Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the result.
```
 - system: `"x86_64-linux"`
 - host os: `Linux 5.4.35, NixOS, 20.09pre-git (Nightingale)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.4`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
```

Maintainer information:
```yaml
# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
  - networking.interfaces
```
Concerning warning log related to networking.interfaces.<name?>.tempAddress
issue
created
rnhmjoj
username_1
(exact) duplicate of #86761.
comment
closed
rnhmjoj
username_1
issue
created
datafoo
username_0
It may seem related but it is not a duplicate.

First the concerning logs are warning (PRIORITY=4) which makes me less inclined to whitelist it in journalwatch.

Also, there are no interfaces named `eth0` and `eth1`. It seems [Predictable Network Interface Names](https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/) is not respected.
comment
reopened
rnhmjoj
username_1
**Describe the bug**

The following warning logs are produced in my server.

```
# journalctl SYSLOG_IDENTIFIER=systemd-udevd -S "11:17:35" -p4
-- Logs begin at Fri 2020-01-31 09:26:25 UTC, end at Mon 2020-05-04 11:41:06 UTC. --
May 04 11:17:35 myhostname systemd-udevd[1025]: eth0: Process '/nix/store/kgp3vq8l9yb8mzghbw83kyr3f26yqvsz-bash-4.4-p23/bin/sh -c 'echo 2 > /proc/sys/net/ipv6/conf/eth0/use_tempaddr'' failed with exit code 1.
May 04 11:17:35 myhostname systemd-udevd[1021]: eth1: Process '/nix/store/kgp3vq8l9yb8mzghbw83kyr3f26yqvsz-bash-4.4-p23/bin/sh -c 'echo 2 > /proc/sys/net/ipv6/conf/eth1/use_tempaddr'' failed with exit code 1.
```

**To Reproduce**
Steps to reproduce the behavior:
1. Boot a NixOS server

**Expected behavior**
No warning should be logged.

**Additional context**
It should be noted the interfaces of my server are named `eno1` and `eno2` and not `eth0` and `eth1` as referred to in the warning logs.

**Notify maintainers**
@username_1 

**Metadata**
Please run `nix-shell -p nix-info --run "nix-info -m"` and paste the result.
```
 - system: `"x86_64-linux"`
 - host os: `Linux 5.4.35, NixOS, 20.09pre-git (Nightingale)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.4`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
```

Maintainer information:
```yaml
# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module:
  - networking.interfaces
```
Concerning warning log related to networking.interfaces.<name?>.tempAddress
issue
created
rnhmjoj
username_1
Sorry, I didn't notice the interface names.
That message is surely coming from the IPv6 privacy udev rules. To see their content:
```
cat /etc/udev/rules.d/*-ipv6-privacy-extensions.rules
```
The interfaces are set from NixOS but are coming from the kernel. I'm not sure why you're seeing `eth0` and `eth1`. Maybe the traditional scheme is used first and later the interfaces are converted to the new scheme so the udev rules are fired twice.
comment
created
datafoo
username_0
The message seems indeed to come from the udev rules:
```
[root@myhostname:~]# journalctl --grep "/proc/sys/net/ipv6/conf/" -b
-- Logs begin at Fri 2020-01-31 09:26:25 UTC, end at Wed 2020-05-13 07:39:28 UTC. --
May 13 06:56:49 myhostname systemd-udevd[1007]: eth1: Process '/nix/store/x7fr0bvnwvqvr3zg60di9jxvfwimcw7m-bash-4.4-p23/bin/sh -c 'echo 2 > /proc/sys/net/ipv6/conf/eth1/use_tempaddr'' failed with exit code 1.
May 13 06:56:49 myhostname systemd-udevd[1011]: eth0: Process '/nix/store/x7fr0bvnwvqvr3zg60di9jxvfwimcw7m-bash-4.4-p23/bin/sh -c 'echo 2 > /proc/sys/net/ipv6/conf/eth0/use_tempaddr'' failed with exit code 1.

[root@myhostname:~]# cat /etc/udev/rules.d/98-ipv6-privacy-extensions.rules
# enable and prefer IPv6 privacy addresses by default
ACTION=="add", SUBSYSTEM=="net", RUN+="/nix/store/x7fr0bvnwvqvr3zg60di9jxvfwimcw7m-bash-4.4-p23/bin/sh -c 'echo 2 > /proc/sys/net/ipv6/conf/%k/use_tempaddr'"


```
comment
created
datafoo
username_0
So it seems the kernel does not respect [Predictable Network Interface Names](https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/) .

@username_3 @volth: you worked on the following code, do you know what is happening?
https://github.com/NixOS/nixpkgs/blob/a448d9156b54cb5970725c5b9bc17f93667b4cac/nixos/modules/tasks/network-interfaces.nix#L1169
comment
created
datafoo
username_0
The interfaces are renamed according to the logs:
- `igb 0000:01:00.0 eno1: renamed from eth0`
- `igb 0000:02:00.0 eno2: renamed from eth1`

```log
[root@myhostname:~]# journalctl SYSLOG_IDENTIFIER=kernel SYSLOG_IDENTIFIER=systemd-udevd -o short-precise -S 07:50:58.322667
-- Logs begin at Tue 2020-08-25 09:27:43 UTC, end at Thu 2020-09-10 10:16:18 UTC. --
Sep 10 07:50:58.322667 myhostname systemd-udevd[994]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
Sep 10 07:50:58.338094 myhostname kernel: pps pps0: new PPS source ptp0
Sep 10 07:50:58.338416 myhostname kernel: igb 0000:01:00.0: added PHC on eth0
Sep 10 07:50:58.338729 myhostname kernel: igb 0000:01:00.0: Intel(R) Gigabit Ethernet Network Connection
Sep 10 07:50:58.339025 myhostname kernel: igb 0000:01:00.0: eth0: (PCIe:2.5Gb/s:Width x1) ac:1f:6b:**:**:*2
Sep 10 07:50:58.339320 myhostname kernel: igb 0000:01:00.0: eth0: PBA No: 012700-000
Sep 10 07:50:58.339613 myhostname kernel: igb 0000:01:00.0: Using MSI-X interrupts. 4 rx queue(s), 4 tx queue(s)
Sep 10 07:50:58.385474 myhostname kernel: Adding 16777212k swap on /dev/zd0.  Priority:-2 extents:1 across:16777212k SSFS
Sep 10 07:50:58.387057 myhostname kernel: pps pps1: new PPS source ptp1
Sep 10 07:50:58.387332 myhostname kernel: igb 0000:02:00.0: added PHC on eth1
Sep 10 07:50:58.387643 myhostname kernel: igb 0000:02:00.0: Intel(R) Gigabit Ethernet Network Connection
Sep 10 07:50:58.387934 myhostname kernel: igb 0000:02:00.0: eth1: (PCIe:2.5Gb/s:Width x1) ac:1f:6b:**:**:*3
Sep 10 07:50:58.388234 myhostname kernel: igb 0000:02:00.0: eth1: PBA No: 012700-000
Sep 10 07:50:58.388534 myhostname kernel: igb 0000:02:00.0: Using MSI-X interrupts. 4 rx queue(s), 4 tx queue(s)
Sep 10 07:50:58.431596 myhostname kernel: dw-apb-uart.2: ttyS2 at MMIO 0x9141b000 (irq = 20, base_baud = 7500000) is a 16550A
Sep 10 07:50:58.483008 myhostname kernel: urandom_read: 3 callbacks suppressed
Sep 10 07:50:58.483060 myhostname kernel: random: rngd: uninitialized urandom read (16 bytes read)
Sep 10 07:50:58.489276 myhostname systemd-udevd[994]: Using default interface naming scheme 'v243'.
Sep 10 07:50:58.491201 myhostname kernel: igb 0000:01:00.0 eno1: renamed from eth0
Sep 10 07:50:58.490472 myhostname systemd-udevd[994]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
Sep 10 07:50:58.493022 myhostname kernel: iTCO_wdt: Intel TCO WatchDog Timer Driver v1.11
Sep 10 07:50:58.493073 myhostname kernel: iTCO_wdt: Found a Intel PCH TCO device (Version=6, TCOBASE=0x0400)
Sep 10 07:50:58.493107 myhostname kernel: iTCO_wdt: initialized. heartbeat=30 sec (nowayout=0)
Sep 10 07:50:58.498628 myhostname systemd-udevd[993]: Using default interface naming scheme 'v243'.
Sep 10 07:50:58.504470 myhostname kernel: input: HID 0557:2419 as /devices/pci0000:00/0000:00:14.0/usb1/1-14/1-14.1/1-14.1:1.0/0003:0557:2419.0001/input/input2
Sep 10 07:50:58.506662 myhostname systemd-udevd[993]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
Sep 10 07:50:58.510008 myhostname kernel: igb 0000:02:00.0 eno2: renamed from eth1
Sep 10 07:50:58.518009 myhostname kernel: checking generic (90000000 300000) vs hw (90000000 1000000)
Sep 10 07:50:58.518098 myhostname kernel: fb0: switching to astdrmfb from EFI VGA
Sep 10 07:50:58.520009 myhostname kernel: Console: switching to colour dummy device 80x25
Sep 10 07:50:58.520056 myhostname kernel: [drm] P2A bridge disabled, using default configuration
Sep 10 07:50:58.520084 myhostname kernel: [drm] AST 2500 detected
Sep 10 07:50:58.520109 myhostname kernel: [drm] Analog VGA only
Sep 10 07:50:58.520310 myhostname kernel: [drm] dram MCLK=800 Mhz type=1 bus_width=16 size=01000000
Sep 10 07:50:58.520061 myhostname systemd-udevd[994]: eth0: Process '/nix/store/hrpvwkjz04s9i4nmli843hyw9z4pwhww-bash-4.4-p23/bin/sh -c 'echo 2 > /proc/sys/net/ipv6/conf/eth0/use_tempaddr'' failed with exit code 1.
Sep 10 07:50:58.523512 myhostname kernel: [TTM] Zone  kernel: Available graphics memory: 8150938 KiB
Sep 10 07:50:58.523642 myhostname kernel: [TTM] Zone   dma32: Available graphics memory: 2097152 KiB
Sep 10 07:50:58.523668 myhostname kernel: [TTM] Initializing pool allocator
Sep 10 07:50:58.523700 myhostname kernel: [TTM] Initializing DMA pool allocator
Sep 10 07:50:58.525008 myhostname kernel: random: crng init done
Sep 10 07:50:58.543011 myhostname kernel: intel_rapl_common: Found RAPL domain package
Sep 10 07:50:58.543076 myhostname kernel: intel_rapl_common: Found RAPL domain core
Sep 10 07:50:58.543367 myhostname kernel: intel_rapl_common: Found RAPL domain dram
Sep 10 07:50:58.552832 myhostname systemd-udevd[978]: Using default interface naming scheme 'v243'.
Sep 10 07:50:58.554517 myhostname kernel: fbcon: astdrmfb (fb0) is primary device
Sep 10 07:50:58.557364 myhostname kernel: hid-generic 0003:0557:2419.0001: input,hidraw0: USB HID v1.00 Keyboard [HID 0557:2419] on usb-0000:00:14.0-14.1/input0
Sep 10 07:50:58.563007 myhostname kernel: input: HID 0557:2419 as /devices/pci0000:00/0000:00:14.0/usb1/1-14/1-14.1/1-14.1:1.1/0003:0557:2419.0002/input/input3
Sep 10 07:50:58.563061 myhostname kernel: hid-generic 0003:0557:2419.0002: input,hidraw1: USB HID v1.00 Mouse [HID 0557:2419] on usb-0000:00:14.0-14.1/input1
Sep 10 07:50:58.572008 myhostname kernel: Console: switching to colour frame buffer device 128x48
Sep 10 07:50:58.581011 myhostname kernel: ast 0000:05:00.0: fb0: astdrmfb frame buffer device
Sep 10 07:50:58.583068 myhostname systemd-udevd[993]: eth1: Process '/nix/store/hrpvwkjz04s9i4nmli843hyw9z4pwhww-bash-4.4-p23/bin/sh -c 'echo 2 > /proc/sys/net/ipv6/conf/eth1/use_tempaddr'' failed with exit code 1.
Sep 10 07:50:58.596009 myhostname kernel: [drm] Initialized ast 0.1.0 20120228 for 0000:05:00.0 on minor 0
Sep 10 07:50:58.612009 myhostname kernel: mousedev: PS/2 mouse device common for all mice
Sep 10 07:50:58.977012 myhostname kernel: Ethernet Channel Bonding Driver: v3.7.1 (April 27, 2011)
Sep 10 07:50:58.979607 myhostname systemd-udevd[978]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
Sep 10 07:50:59.042025 myhostname kernel: bond0: (slave eno2): Enslaving as a backup interface with a down link
Sep 10 07:50:59.042087 myhostname kernel: kauditd_printk_skb: 18 callbacks suppressed
Sep 10 07:50:59.042127 myhostname kernel: audit: type=1305 audit(1599724259.039:29): op=set audit_enabled=0 old=1 auid=4294967295 ses=4294967295 subj=kernel res=1
Sep 10 07:50:59.068514 myhostname kernel: bond0: (slave eno1): Enslaving as a backup interface with a down link
Sep 10 07:50:59.081006 myhostname kernel: NET: Registered protocol family 17
Sep 10 07:51:01.898011 myhostname kernel: igb 0000:02:00.0 eno2: igb: eno2 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Sep 10 07:51:01.932009 myhostname kernel: igb 0000:01:00.0 eno1: igb: eno1 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX
Sep 10 07:51:02.016800 myhostname kernel: bond0: (slave eno2): link status definitely up, 1000 Mbps full duplex
Sep 10 07:51:02.016871 myhostname kernel: bond0: (slave eno2): making interface the new active one
Sep 10 07:51:02.016903 myhostname kernel: bond0: active interface up!
Sep 10 07:51:02.016940 myhostname kernel: IPv6: ADDRCONF(NETDEV_CHANGE): bond0: link becomes ready
Sep 10 07:51:02.121011 myhostname kernel: bond0: (slave eno1): link status definitely up, 1000 Mbps full duplex
```

I do not know much about udev, maybe the udev [rule](https://github.com/NixOS/nixpkgs/blob/a448d9156b54cb5970725c5b9bc17f93667b4cac/nixos/modules/tasks/network-interfaces.nix#L1169) is triggered as soon as the network interface is detected and by the time the `RUN` command is executed, the kernel has already renamed the interface.
comment
created
QuantMint
username_2
The same thing is happening here on NixOS unstable: `systemd-udevd[526]: eth0: Process '/nix/store/07j81a5xy8j1srvf57dl7lxsaihnmfac-bash-5.1-p12/bin/sh -c 'echo 2 > /proc/sys/net/ipv6/conf/eth0/use_tempaddr'' failed with exit code 1.`
comment
closed
lheckemann
username_3
issue