Comment 3 for bug 1735331

Revision history for this message
Chad Smith (chad.smith) wrote :

In further testing it is a timing thing with our tempdirectory being removed before dhclient attempts to write the actual pidfile.

sudo python3 -c 'from cloudinit.net.dhcp import maybe_perform_dhcp_discovery; maybe_perform_dhcp_discovery()'

This fails 100% of the time in zesty and artful emitting "Can't create dhclient[3296]: Can't create /var/tmp/cloud-init/.../dhclient.pid"

If I add a sleep(0.000001) in cloudinit/net/dhcp.py on line 123 just after the sandbox_dhclient_cmd, no pidfile write errors are produced by dhclient in /var/log/syslog.