[Bug 1949893] Re: new interface does not show up after dbus config apply
Lukas Märdian
1949893 at bugs.launchpad.net
Mon Nov 29 13:44:24 UTC 2021
** Also affects: netplan.io (Ubuntu)
Importance: Undecided
Status: New
** Also affects: netplan.io (Ubuntu Jammy)
Importance: Undecided
Status: New
** Also affects: netplan.io (Ubuntu Focal)
Importance: Undecided
Status: New
** Also affects: netplan.io (Ubuntu Impish)
Importance: Undecided
Status: New
** Also affects: netplan.io (Ubuntu Hirsute)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to netplan.io in Ubuntu.
Matching subscriptions: foundations-bugs
https://bugs.launchpad.net/bugs/1949893
Title:
new interface does not show up after dbus config apply
Status in netplan:
In Progress
Status in netplan.io package in Ubuntu:
New
Status in netplan.io source package in Focal:
New
Status in netplan.io source package in Hirsute:
New
Status in netplan.io source package in Impish:
New
Status in netplan.io source package in Jammy:
New
Bug description:
While working on the integration tests for netplan on ubuntu core I ran into the following issue:
1. the config system.network.netplan.network.bridges.br54.dhcp4=true is set
2. a subsequent "ip link" does not show this network interface
From the test log:
"""
...
+ echo 'Check that setting adding a br54 interface via netplan works'
Check that setting adding a br54 interface via netplan works
+ snap set system system.network.netplan.network.bridges.br54.dhcp4=true
+ echo 'Check that the interface is really there'
Check that the interface is really there
+ MATCH br54
+ ip link
grep error: pattern not found, got:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
"""
But when I ssh into this machine:
"""
qemu:ubuntu-core-20-64 .../tests/core/netplan-cfg# netplan get
network:
bridges:
br54:
dhcp4: true
ethernets:
all-en:
dhcp4: true
match:
name: en*
all-eth:
dhcp4: true
match:
name: eth*
version: 2
"""
So the interfac is there but not applied.
What the go code is doing internally (using dbus) is:
1. clear config
2. set new config
3. call io.netplan.Netplan.Config.Try with a 30s timeout
4. check if store is still reachable
5. run io.netplan.Netplan.Config.Apply
Log:
"""
Nov 04 18:35:56 ubuntu snapd[2864]: daemon.go:216: DEBUG: pid=3308;uid=0;socket=/run/snapd.socket; GET /v2/snaps/system/conf?keys=system.network.netplan.network.version 188.318703ms 200
Nov 04 18:35:56 ubuntu snapd[2864]: netplan.go:122: DEBUG: using netplan config /io/netplan/Netplan/config/WCELC1
Nov 04 18:35:57 ubuntu snapd[2864]: daemon.go:216: DEBUG: pid=3321;uid=0;socket=/run/snapd.socket; GET /v2/snaps/system/conf?keys=system.network.netplan 250.060706ms 200
Nov 04 18:35:57 ubuntu snapd[2864]: daemon.go:216: DEBUG: pid=3348;uid=0;socket=/run/snapd.socket; PUT /v2/snaps/system/conf 5.846868ms 202
Nov 04 18:35:57 ubuntu snapd[2864]: taskrunner.go:439: DEBUG: Running task 149 on Do: Run configure hook of "core" snap
Nov 04 18:35:57 ubuntu snapd[2864]: netplan.go:122: DEBUG: using netplan config /io/netplan/Netplan/config/MYV8B1
Nov 04 18:35:57 ubuntu snapd[2864]: netplan.go:122: DEBUG: using netplan config /io/netplan/Netplan/config/V1VAC1
Nov 04 18:35:57 ubuntu snapd[2864]: netplan.go:181: DEBUG: calling netplan.Set: network=null
Nov 04 18:35:57 ubuntu snapd[2864]: netplan.go:181: DEBUG: calling netplan.Set: network={"bridges":{"br54":{"dhcp4":true}},"ethernets":{"all-en":{"dhcp4":true,"match":{"name":"en*"}},"all-eth":{"dhcp4":true,"match":{"name":"eth*"}}},"version":2}
...
Nov 04 18:35:58 ubuntu snapd[2864]: netplan.go:229: DEBUG: netplan config applied correctly
"""
The originHint for all of these is "00-snapd-config.yaml"
But the interface does not appear.
But a subsequent:
""
qemu:ubuntu-core-20-64 .../tests/core/netplan-cfg# netplan apply --debug
[notice that there is no output here? sorry, I was holding it wrong and filed https://bugs.launchpad.net/netplan/+bug/1949895 about that]
qemu:ubuntu-core-20-64 .../tests/core/netplan-cfg# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
3: br54: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/ether 32:b4:1e:6a:73:ba brd ff:ff:ff:ff:ff:ff
"""
and the interface appears. Any hints welcome, this is netplan
"0.103-0ubuntu5~20.04.2" - I think this code was working before (well,
it would cause crashes later but this bit iirc worked).
Any hints welcome :)
Details for how netplan dbus is driven can be found in
https://github.com/snapcore/snapd/pull/10752/files#diff-c86917f7728e51b6582063142105b47a9a2677b252a9928b3c37b3b353839ac7R161
To manage notifications about this bug go to:
https://bugs.launchpad.net/netplan/+bug/1949893/+subscriptions
More information about the foundations-bugs
mailing list