I was wrong and looked at old code. There is now a case where the dbus Try()
returns "false". It was added in e19441c3 and has:
"""
+ /* wait for the /run/netplan/netplan-try.ready stamp file to appear */
+ guint poll_timeout = 500;
+ if (seconds > 0 && seconds < 5)
+ poll_timeout = seconds * 100;
+ /* Timeout after up to 5 sec of waiting for the stamp file */
+ for (int i = 0; i < poll_timeout; i++) {
+ if (stat(netplan_try_stamp, &buf) == 0)
+ break;
+ usleep(1000 * 10);
+ }
+ if (stat(netplan_try_stamp, &buf) != 0) {
+ g_debug("cannot find %s stamp file", netplan_try_stamp);
+ return sd_bus_reply_method_return(m, "b", false);
+ }
"""
Maybe 5s is a bit low on slow systems, maybe something else is doing on.
I also wonder if netplan should report some sort of error in this case
to provide more context?
** Description changed:
As part of our snapd core integration testing we run the spread test for
netplan on a UC20 PI device.
On this device our test fails with:
"""
2022-03-25 14:33:00 Error executing
external:ubuntu-core-20-arm-32:tests/core/netplan-cfg
(external:ubuntu-core-20-arm-32) :
-----
+ echo 'Getting version works'
Getting version works
+ snap get system system.network.netplan.network.version
+ MATCH '^2$'
+ echo 'Getting the full document works and it is valid json'
Getting the full document works and it is valid json
+ jq .
+ snap get -d system system.network.netplan
{
"system.network.netplan": {
"network": {
"ethernets": {
"eth0": {
"dhcp4": true,
"match": {
"macaddress": "b8:27:eb:41:42:43"
},
"set-name": "eth0"
}
},
"version": 2
}
}
}
+ 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
error: cannot perform the following tasks:
- Run configure hook of "core" snap (run hook "configure": cannot try netplan
config: no specific reason returned from netplan)
-----
"""
This error means that snapd called io.netplan.Netplan.Config.Set and got
a "false" without an error from that call (c.f.
https://github.com/snapcore/snapd/blob/master/overlord/configstate/configcore/netplan.go#L218)
+
+
+ [edit: now this also fails in GCE testing on amd64 and this looks like a
regression as this used to work].
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1967084
Title:
netplan dbus returns "false" in io.netplan.Netplan.Config.Set
To manage notifications about this bug go to:
https://bugs.launchpad.net/netplan/+bug/1967084/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs