Comment 6 for bug 1967084

Revision history for this message
Michael Vogt (mvo) wrote : Re: netplan dbus returns "false" in io.netplan.Netplan.Config.Set

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?