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?
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: netplan- try.ready stamp file to appear */ try_stamp, &buf) == 0) try_stamp, &buf) != 0) { reply_method_ return( m, "b", false);
"""
+ /* wait for the /run/netplan/
+ 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_
+ break;
+ usleep(1000 * 10);
+ }
+ if (stat(netplan_
+ g_debug("cannot find %s stamp file", netplan_try_stamp);
+ return sd_bus_
+ }
"""
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?