[SRU] networkd-dispatcher gives corrupted information

Bug #1884248 reported by Sebastian Unger
28
This bug affects 5 people
Affects Status Importance Assigned to Milestone
networkd-dispatcher (Ubuntu)
Fix Released
High
Unassigned
Bionic
Invalid
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned
Groovy
Won't Fix
Undecided
Unassigned
Hirsute
Fix Released
High
Unassigned
Impish
Fix Released
High
Unassigned

Bug Description

[Impact]

 * Due to changes in systemd's networkctl output networkd-dispatcher 2.0 contains a bug, producing invalid keys/values inside the JSON it provides to its scripts
 * e.g.: json={"A": ["ress: 119.224.106.22 (DHCP4)"], ...}
 * Therefore the scripts cannot access the relevant network configuration state

[Test Plan]

 * Run systemd v244+ (e.g. in a LXD container)
 * Make sure you got an IP address via DHCP:
 * # networkctl status eth0
● 120: eth0
             Link File: /usr/lib/systemd/network/99-default.link
          Network File: /run/systemd/network/10-netplan-eth0.network
                  Type: ether
                 State: routable (configured)
                Driver: veth
            HW Address: 00:16:3e:0b:d7:74 (Xensource, Inc.)
                   MTU: 1500 (min: 68, max: 65535)
  Queue Length (Tx/Rx): 1/1
      Auto negotiation: no
                 Speed: 10Gbps
                Duplex: full
                  Port: tp
               Address: 10.238.94.146 (DHCP4)
                        fd42:7213:f20e:bd74:216:3eff:fe0b:d774
                        fe80::216:3eff:fe0b:d774
               Gateway: 10.238.94.1 (Xensource, Inc.)
                        fe80::216:3eff:fe0f:ee29 (Xensource, Inc.)
                   DNS: 10.238.94.1
                        fd42:7213:f20e:bd74::1
                        fe80::216:3eff:fe0f:ee29
        Search Domains: lxd
     Activation Policy: up
 * # cat /etc/networkd-dispatcher/routable.d/00run.sh
#!/bin/bash
env > /tmp/out.log
 * chmod +x /etc/networkd-dispatcher/routable.d/00run.sh
 * # networkd-dispatcher --run-startup-triggers
 * cat /tmp/out.log
 * Check json= ENV to verify if it contains the correct IPv4 address (without "(DHCP4)" suffix).

[Where problems could occur]

 * This was broken in 2.0 and the fix changes the behavior back to what was originally intended.
 * If people adopted to the broken environment variable, to somehow parse the information they need from the broken JSON, this change will most probably break their networkd-dispatcher scripts (again).

[Other Info]

 * The upstream version 2.1 just fixes the parsing of current networkctl output (in addition to a few testing and documentation improvements)
 * The Debian revision -2 fixes the parsing of the "(DHCP4 ...)" suffix
 * The 2.0.1 -> 2.1 version bump does not contain any relevant changes other than the fix for this bug:

The comparison (https://gitlab.com/craftyguy/networkd-dispatcher/-/compare/2.0.1...2.1) shows that it contains “7 changed files with 52 additions and 35 deletions”:

* Several fixes to Gitlab CI YAML – not relevant
* Increased logging in tests/ – not relevant
* Documentation of already existing features (README & manpage) – not relevant
* Update of copyright year – not relevant
* Update tox.ini & Gitlab CI for py38 test environment – not relevant
* fix get_networkctl_status parse error if align of output changed – the RELEVANT fix for this bug

=== Original description ===

I just reinstalled my RPI3 router from Eoan to Focal but a lot of things about networkd broke. I'm not sure whether they are related or not.

The first thing I noticed was, that I did not get my upstream DNS servers. I use a dispatcher script to extract the information from the json environment variable when my uplink becomes routable. Using a test script to dump the environment I found this:

IP6_ADDRS=
PWD=/
json={"A": ["ress: 119.224.106.22 (DHCP4)"], "AdministrativeState": "configuring", "Auto negot": ["tion: yes", "peed: 100Mbps", "plex: full", "Port: mii"], "G": ["eway: 119.224.106.21", "DNS: 202.180.64.10", "202.180.64.11", ""], "HW A": ["ress: b8:27:eb:b6:a5:f4 (Raspberry Pi Foundation)", "MTU: 1500 (max: 65535)"], "InterfaceName": "wan", "Jun 20 00:01:49": ["mnus systemd-networkd[534]: wan: netdev ready", "mnus systemd-networkd[534]: wan: Link UP", "mnus systemd-networkd[534]: wan: Gained carrier"], "Jun 20 00:01:50": ["mnus systemd-networkd[534]: wan: Lost carrier"], "Jun 20 00:01:51": ["mnus systemd-networkd[534]: wan: Gained carrier"], "Jun 20 00:01:53": ["mnus systemd-networkd[534]: wan: DHCPv4 address 119.224.106.22/30 via 119.224.106.21"], "Lin": ["File: /usr/lib/systemd/network/99-default.link"], "Networ": ["File: /etc/systemd/network/07-wan.network", "Type: vlan", "tate: routable (configured)", "iver: 802.1Q VLAN Support"], "OperationalState": "routable", "Queue Length (": ["/Rx): 1/1"], "State": "routable (configuring)", "Type": "vlan"}
AdministrativeState=configuring
IFACE=wan
LANG=en_NZ.UTF-8
INVOCATION_ID=384cc7de4e8d45e48ecb2ecf3cb55508
IP_ADDRS=
ESSID=
ADDR=
NOTIFY_SOCKET=/run/systemd/notify
SHLVL=1
STATE=routable
JOURNAL_STREAM=9:35403
OperationalState=routable
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
networkd_dispatcher_args=--run-startup-triggers

Note that the script worked perfectly fine on Eoan.

Also when I tried to get the dump above, I ran the following command after installing the test-script:
ip link delete wan type vlan; systemctl restart systemd-networkd
in order to force networkd to recreate and reconfigure my uplink interface. Doing this resulted in all connectivity with the router being lost (up- and downstream). After a restart, I found the following in the networkd journal indicating that networkd had in fact crashed.

Jun 19 23:59:58 tumnus systemd-networkd[539]: wan: Link DOWN
Jun 19 23:59:58 tumnus systemd-networkd[539]: wan: Lost carrier
Jun 19 23:59:58 tumnus systemd-networkd[539]: wan: DHCP lease lost
Jun 19 23:59:58 tumnus systemd[1]: Stopping Network Service...
Jun 19 23:59:58 tumnus systemd[1]: systemd-networkd.service: Succeeded.
Jun 19 23:59:58 tumnus systemd[1]: Stopped Network Service.
Jun 19 23:59:58 tumnus systemd[1]: Starting Network Service...
Jun 19 23:59:59 tumnus systemd-networkd[1986]: private: netdev ready
Jun 19 23:59:59 tumnus systemd-networkd[1986]: Enumeration completed
Jun 19 23:59:59 tumnus systemd[1]: Started Network Service.
Jun 19 23:59:59 tumnus systemd-networkd[1986]: private: netdev exists, using existing without changing its parameters
Jun 20 00:00:00 tumnus systemd[1]: systemd-networkd.service: Main process exited, code=dumped, status=11/SEGV
Jun 20 00:00:00 tumnus systemd[1]: systemd-networkd.service: Failed with result 'core-dump'.
Jun 20 00:00:00 tumnus systemd[1]: systemd-networkd.service: Scheduled restart job, restart counter is at 1.
Jun 20 00:00:00 tumnus systemd[1]: Stopped Network Service.
Jun 20 00:00:00 tumnus systemd[1]: Starting Network Service...
Jun 20 00:00:01 tumnus systemd-networkd[2034]: private: netdev ready
Jun 20 00:00:01 tumnus systemd-networkd[2034]: Enumeration completed
Jun 20 00:00:01 tumnus systemd[1]: Started Network Service.
Jun 20 00:00:01 tumnus systemd-networkd[2034]: private: netdev exists, using existing without changing its parameters
Jun 20 00:00:01 tumnus systemd-networkd[2034]: wan: Link UP
Jun 20 00:00:01 tumnus systemd-networkd[2034]: wan: Gained carrier
Jun 20 00:00:01 tumnus systemd-networkd[2034]: private: Could not join netdev: Can not enslave a bridge to a bridge. Too many levels of symbolic links
Jun 20 00:00:01 tumnus systemd-networkd[2034]: private: Failed
Jun 20 00:00:01 tumnus systemd-networkd[2034]: wan: DHCPv4 address 119.224.106.22/30 via 119.224.106.21
Jun 20 00:01:22 tumnus systemd[1]: Stopping Network Service...
Jun 20 00:01:22 tumnus systemd-networkd[2034]: wan: DHCP lease lost
Jun 20 00:01:22 tumnus systemd[1]: systemd-networkd.service: Succeeded.
Jun 20 00:01:22 tumnus systemd[1]: Stopped Network Service.
-- Reboot --

However, no crash file had been generated.
The system is running systemd 245.4-4ubuntu3.1 and networkd-dispatcher 2.0.1-1.

Revision history for this message
Sebastian Unger (sebunger44) wrote :

Ok, it looks like the networkd crash & error message about enslaving a bridge to a bridge was caused by the fact that the network file for one of the bridge ports had a Match on MACAddress and came before the bridge's own network file. Therefore, on restarting networkd matched the port network file to the bridge itself (which had inherited that ports mac address) and hence tried to enslave the bridge to itself with obviously bad consequences.

It did not used to do that on Eoan, but changing the ports Match section to match on the interface's name means I can now restart networkd without it crashing (and without me loosing comms).

However, the dispatcher json is still just as mangled as before.

Revision history for this message
Sebastian Unger (sebunger44) wrote :

So does this silence mean people have tried to reproduce this but couldn't or that they could and are working on it or that nobody has tried?

I would have thought this kind of corruption is hinting at a possibility of there being some possibility that this could be exploited and get a bit more "interest".

It is 100% reproducible for me, so if there's anything I can do to help debug this, please let me know.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in networkd-dispatcher (Ubuntu):
status: New → Confirmed
Revision history for this message
Phil Turmel (pturmel-lp) wrote :

I'm a recent upgrader from bionic to focal thanks to a new System76 laptop that came with 20.04 pre-installed. I've been moving my netplan/dnsmasq configuration over to the new laptop and ran into this bug (I use a networkd-dispatcher script to pass DNS to dnsmasq via openresolv). I added a temporary script to save the entire environment to file. This is what I get:

ADDR=
AdministrativeState=configuring
BASH=/bin/bash
BASHOPTS=checkwinsize:cmdhist:complete_fullquote:extquote:force_fignore:globasciiranges:hostcomplete:interactive_comments:progcomp:promptvars:sourcepath
BASH_ALIASES=()
BASH_ARGC=()
BASH_ARGV=()
BASH_CMDS=()
BASH_LINENO=([0]="0")
BASH_SOURCE=([0]="/etc/networkd-dispatcher/routable.d/03-env.sh")
BASH_VERSINFO=([0]="5" [1]="0" [2]="17" [3]="1" [4]="release" [5]="x86_64-pc-linux-gnu")
BASH_VERSION='5.0.17(1)-release'
DIRSTACK=()
ESSID=
EUID=0
GROUPS=()
HOSTNAME=porthos
HOSTTYPE=x86_64
IFACE=br1
IFS=$' \t\n'
INVOCATION_ID=1218902d49134c42b318bb8557f2f3d3
IP6_ADDRS=
IP_ADDRS=
JOURNAL_STREAM=9:31399
LANG=en_US.UTF-8
MACHTYPE=x86_64-pc-linux-gnu
NOTIFY_SOCKET=/run/systemd/notify
OPTERR=1
OPTIND=1
OSTYPE=linux-gnu
OperationalState=routable
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin
PPID=1184
PS4='+ '
PWD=/
SHELL=/bin/bash
SHELLOPTS=braceexpand:hashall:interactive-comments
SHLVL=1
STATE=routable
TERM=dumb
UID=0
_=/bin/bash
json='{"AdministrativeState": "configuring", "Age": ["g Time: 5min", "iority: 32768", "STP: no"], "Aug 10 14:19:23": ["rthos systemd-networkd[8359]: br1: netdev ready", "rthos systemd-networkd[8359]: br1: Gained IPv6LL", "rthos systemd-networkd[8359]: br1: netdev exists, using existing without changing its parameters", "rthos systemd-networkd[8359]: br1: IPv6 successfully enabled"], "Aug 10 14:20:27": ["rthos systemd-networkd[8692]: br1: netdev ready", "rthos systemd-networkd[8692]: br1: Gained IPv6LL", "rthos systemd-networkd[8692]: br1: netdev exists, using existing without changing its parameters", "rthos systemd-networkd[8692]: br1: IPv6 successfully enabled"], "Aug 10 14:20:30": ["rthos systemd-networkd[8692]: br1: Gained carrier"], "Aug 10 14:21:05": ["rthos systemd-networkd[8692]: br1: DHCPv4 address 192.168.19.160/24 via 192.168.19.1"], "Forwa": ["Delay: 15s"], "HW": ["ddress: 00:30:93:12:08:d9 (Sonnet Technologies, Inc)", "MTU: 1500 (min: 68, max: 65535)"], "He": ["o Time: 2s", "ax Age: 20s"], "InterfaceName": "br1", "L": ["k File: n/a"], "Multicast IGMP": ["ersion: 2"], "Netw": ["k File: /run/systemd/network/10-netplan-br1.network", "Type: bridge", "State: routable (configured)", "Driver: bridge"], "OperationalState": "routable", "Queue Length": ["Tx/Rx): 1/1", "ddress: 192.168.19.160 (DHCP4)", "fe80::b0cd:9aff:fe37:c785", "ateway: 192.168.19.1", "DNS: 192.168.19.1", "NTP: 192.168.19.1", ""], "State": "routable (configuring)", "Type": "bridge"}'
networkd_dispatcher_args=--run-startup-triggers

Revision history for this message
Phil Turmel (pturmel-lp) wrote :

Any hope for this bug? A look at the corrupted json suggests that networkd-dispatcher is assembling it by parsing log entries (?!?!?). Something about my environment must be generating log entries that fit the filters it is using but are normally not present (or many others would be complaining).

tags: added: rls-hh-incoming
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

it is valid json.... bu thte keys and valu es l ook malforme d.

Changed in networkd-dispatcher (Ubuntu):
importance: Undecided → High
tags: added: fr-878
tags: removed: rls-hh-incoming
Revision history for this message
Julian Andres Klode (juliank) wrote :

This is fixed in 2.1 I'll have to upload it.

Changed in networkd-dispatcher (Ubuntu):
status: Confirmed → In Progress
Changed in networkd-dispatcher (Ubuntu Groovy):
status: New → Triaged
Changed in networkd-dispatcher (Ubuntu Focal):
status: New → Triaged
Changed in networkd-dispatcher (Ubuntu Bionic):
status: New → Confirmed
status: Confirmed → New
Revision history for this message
Sebastian Unger (sebunger44) wrote :

Oh, that's good news. Let us know when it is uploaded and I give it a spin.

Revision history for this message
Julian Andres Klode (juliank) wrote :

Uploaded in Debian as 2.1-1, pending processing there and autosync.

Changed in networkd-dispatcher (Ubuntu Hirsute):
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package networkd-dispatcher - 2.1-1

---------------
networkd-dispatcher (2.1-1) unstable; urgency=medium

  * New upstream release 2.1 (Closes: #968941)
    - fixes parsing of current systemd (LP: #1884248)

 -- Julian Andres Klode <email address hidden> Tue, 10 Nov 2020 14:35:05 +0100

Changed in networkd-dispatcher (Ubuntu Hirsute):
status: Fix Committed → Fix Released
Revision history for this message
Sebastian Unger (sebunger44) wrote :

Any idea whether this fix can be back-ported to focal?

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in networkd-dispatcher (Ubuntu Bionic):
status: New → Confirmed
Revision history for this message
Sebastian Unger (sebunger44) wrote :

Any idea whether this fix can be back-ported to focal?

Revision history for this message
Sebastian Unger (sebunger44) wrote :

In fact, I can confirm that hirsute package cleanly installs in focal and (almost) fixes the issue.

Almost because the Address is set to the string "172.25.117.104 (DHCP4)" which is not very useful. Expecting scripts to parse that string and take it apart makes a farce of passing all that information in JSON format in the first place.

Revision history for this message
Julian Andres Klode (juliank) wrote :

Thanks for the update. We'll have a look at this in a couple days.

Lukas Märdian (slyon)
summary: - networkd-dispatcher gives corrupted information
+ [SRU] networkd-dispatcher gives corrupted information
Lukas Märdian (slyon)
description: updated
Lukas Märdian (slyon)
Changed in networkd-dispatcher (Ubuntu Hirsute):
status: Fix Released → Triaged
Lukas Märdian (slyon)
Changed in networkd-dispatcher (Ubuntu Hirsute):
status: Triaged → In Progress
Changed in networkd-dispatcher (Ubuntu Focal):
status: Triaged → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Sebastian, or anyone else affected,

Accepted networkd-dispatcher into hirsute-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/networkd-dispatcher/2.1-2~ubuntu21.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-hirsute to verification-done-hirsute. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-hirsute. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in networkd-dispatcher (Ubuntu Hirsute):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-hirsute
Revision history for this message
Lukas Märdian (slyon) wrote :
Download full text (3.2 KiB)

Hello Brian,

thank you for accepting it into hirsute-proposed. I tested networkd-dispatcher 2.1-2~ubuntu21.04.1 and can confirm the bug is fixed:

# dpkg -l | grep systemd
ii systemd 247.3-3ubuntu3.1

# networkctl status eth0
● 149: eth0
                     Link File: n/a
                  Network File: /run/systemd/network/10-netplan-eth0.network
                          Type: ether
                         State: routable (configured)
                    HW Address: 00:16:3e:5c:cd:0c (Xensource, Inc.)
                           MTU: 1500 (min: 68, max: 65535)
                         QDisc: noqueue
  IPv6 Address Generation Mode: eui64
          Queue Length (Tx/Rx): 1/1
              Auto negotiation: no
                         Speed: 10Gbps
                        Duplex: full
                          Port: tp
                       Address: 10.238.94.22 (DHCP4 via 10.238.94.1)
                                fd42:7213:f20e:bd74:216:3eff:fe5c:cd0c
                                fe80::216:3eff:fe5c:cd0c
                       Gateway: 10.238.94.1 (Xensource, Inc.)
                                fe80::216:3eff:fe0f:ee29 (Xensource, Inc.)
                           DNS: 10.238.94.1
                                fe80::216:3eff:fe0f:ee29
                Search Domains: lxd
             Activation Policy: up
               DHCP4 Client ID: 0:16:3e:5c:cd:c
             DHCP6 Client IAID: 0x31b8204f
             DHCP6 Client DUID: DUID-EN/Vendor:0000ab1178959fc6ef55425f0000

# cat /etc/networkd-dispatcher/routable.d/00run.sh
#!/bin/bash
env > /tmp/out.log

# chmod +x /etc/networkd-dispatcher/routable.d/00run.sh
# networkd-dispatcher --run-startup-triggers

# cat /tmp/out.log | grep "\"Address\""
json={"Activation Policy": ["up"], "Address": ["10.238.94.22", "fd42:7213:f20e:bd74:216:3eff:fe5c:cd0c", "fe80::216:3eff:fe5c:cd0c"], "AdministrativeState": "configured", "Auto negotiation": ["no"], "DHCP4 Client ID": ["0:16:3e:5c:cd:c"], "DHCP6 Client DUID": ["DUID-EN/Vendor:0000ab1178959fc6ef55425f0000"], "DHCP6 Client IAID": ["0x31b8204f"], "DNS": ["10.238.94.1", "fe80::216:3eff:fe0f:ee29"], "Duplex": ["full"], "Gateway": ["10.238.94.1 (Xensource, Inc.)", "fe80::216:3eff:fe0f:ee29 (Xensource, Inc.)"], "HW Address": ["00:16:3e:5c:cd:0c (Xensource, Inc.)"], "IPv6 Address Generation Mode": ["eui64"], "InterfaceName": "eth0", "Jul 14 07:02:23 hh systemd-networkd[82]": ["eth0: DHCPv4 address 10.238.94.22/24 via 10.238.94.1"], "Jul 14 07:02:24 hh systemd-networkd[82]": ["eth0: Gained IPv6LL"], "Jul 14 07:03:10 hh systemd-networkd[1855]": ["eth0: Gained IPv6LL", "eth0: DHCPv4 address 10.238.94.22/24 via 10.238.94.1"], "Jul 14 07:03:10 hh systemd-networkd[82]": ["eth0: DHCPv6 lease lost"], "Link File": ["n/a"], "MTU": ["1500 (min: 68, max: 65535)"], "Network File": ["/run/systemd/network/10-netplan-eth0.network"], "OperationalState": "routable", "Port": ["tp"], "QDisc": ["noqueue"], "Queue Length (Tx/Rx)": ["1/1"], "Search Domains": ["lxd"], "Speed": ["10Gbps"], "State": "routable (configured)", "Type": "ether"}

As we can see Address is just "10.238.94.22" wit...

Read more...

tags: added: verification-done-hirsute
removed: verification-needed-hirsute
Changed in networkd-dispatcher (Ubuntu Groovy):
status: Triaged → Won't Fix
Revision history for this message
Lukas Märdian (slyon) wrote :

This bug does not happen for Bionic, as the networkctl output was only changed in systemd v244 while Bionic is on v237.

Changed in networkd-dispatcher (Ubuntu Bionic):
status: Confirmed → Invalid
Lukas Märdian (slyon)
description: updated
description: updated
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Sebastian, or anyone else affected,

Accepted networkd-dispatcher into focal-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/networkd-dispatcher/2.1-2~ubuntu20.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-focal to verification-done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-focal. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in networkd-dispatcher (Ubuntu Focal):
status: In Progress → Fix Committed
tags: added: verification-needed-focal
Revision history for this message
Lukas Märdian (slyon) wrote :

Hello Brian,

thank you for accepting it into focal-proposed. I tested networkd-dispatcher 2.1-2~ubuntu20.04.1 and can confirm the bug is fixed:

# dpkg -l | grep systemd
ii systemd 245.4-4ubuntu3.7

# networkctl status eth0
● 258: eth0
             Link File: /usr/lib/systemd/network/99-default.link
          Network File: /run/systemd/network/10-netplan-eth0.network
                  Type: ether
                 State: routable (configured)
                Driver: veth
            HW Address: 00:16:3e:0b:d7:74 (Xensource, Inc.)
                   MTU: 1500 (min: 68, max: 65535)
  Queue Length (Tx/Rx): 1/1
      Auto negotiation: no
                 Speed: 10Gbps
                Duplex: full
                  Port: tp
               Address: 10.238.94.146 (DHCP4)
                        fd42:7213:f20e:bd74:216:3eff:fe0b:d774
                        fe80::216:3eff:fe0b:d774
               Gateway: 10.238.94.1 (Xensource, Inc.)
                        fe80::216:3eff:fe0f:ee29 (Xensource, Inc.)
                   DNS: 10.238.94.1
                        fd42:7213:f20e:bd74::1
                        fe80::216:3eff:fe0f:ee29
        Search Domains: lxd
     Activation Policy: up

# cat /etc/networkd-dispatcher/routable.d/00run.sh
#!/bin/bash
env > /tmp/out.log

# chmod +x /etc/networkd-dispatcher/routable.d/00run.sh
# networkd-dispatcher --run-startup-triggers

# grep "\"Address\"" /tmp/out.log
json={"Activation Policy": ["up"], "Address": ["10.238.94.146", "fd42:7213:f20e:bd74:216:3eff:fe0b:d774", "fe80::216:3eff:fe0b:d774"], "AdministrativeState": "configured", "Auto negotiation": ["no"], "DNS": ["10.238.94.1", "fd42:7213:f20e:bd74::1", "fe80::216:3eff:fe0f:ee29"], "Driver": ["veth"], "Duplex": ["full"], "Gateway": ["10.238.94.1 (Xensource, Inc.)", "fe80::216:3eff:fe0f:ee29 (Xensource, Inc.)"], "HW Address": ["00:16:3e:0b:d7:74 (Xensource, Inc.)"], "InterfaceName": "eth0", "Jul 15 07:20:21 ff systemd-networkd[86]": ["eth0: IPv6 successfully enabled", "eth0: DHCPv4 address 10.238.94.146/24 via 10.238.94.1"], "Jul 15 07:20:22 ff systemd-networkd[86]": ["eth0: Gained IPv6LL"], "Link File": ["/usr/lib/systemd/network/99-default.link"], "MTU": ["1500 (min: 68, max: 65535)"], "Network File": ["/run/systemd/network/10-netplan-eth0.network"], "OperationalState": "routable", "Port": ["tp"], "Queue Length (Tx/Rx)": ["1/1"], "Search Domains": ["lxd"], "Speed": ["10Gbps"], "State": "routable (configured)", "Type": "ether"}

As we can see Address is just "10.238.94.146" without any "(DHCP4)" suffix.

tags: added: verification-done-focal
removed: verification-needed-focal
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package networkd-dispatcher - 2.1-2~ubuntu20.04.1

---------------
networkd-dispatcher (2.1-2~ubuntu20.04.1) focal; urgency=medium

  [ Lukas Märdian ]
  * Add d/p/0003-Normalize-parsed-IP-address-value.patch to handle IP address
    networkctl output of systemd v244+ (LP: #1884248)

  [ Julian Andres Klode ]
  * debian/gbp.conf: Point to debian/bullseye

 -- Lukas Märdian <email address hidden> Mon, 12 Jul 2021 15:26:17 +0200

Changed in networkd-dispatcher (Ubuntu Focal):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for networkd-dispatcher has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package networkd-dispatcher - 2.1-2~ubuntu21.04.1

---------------
networkd-dispatcher (2.1-2~ubuntu21.04.1) hirsute; urgency=medium

  [ Lukas Märdian ]
  * Add d/p/0003-Normalize-parsed-IP-address-value.patch to handle IP address
    networkctl output of systemd v244+ (LP: #1884248)

  [ Julian Andres Klode ]
  * debian/gbp.conf: Point to debian/bullseye

 -- Lukas Märdian <email address hidden> Mon, 12 Jul 2021 15:16:21 +0200

Changed in networkd-dispatcher (Ubuntu Hirsute):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.