Age | Commit message (Collapse) | Author |
|
Instead of sleep and check loop, use 'udevadm settle' to wait.
since we run from a udev event, this is sufficient.
udev settle will exit when either of
a.) the file exists
b.) the udev event queue has all been processed.
c.) timeout is reached.
Since cloud-init-wait is being run as a udev event, 'b' cannot
be satisfied until it finishes. Thus, this essentially becomes a
inotify based wait for the file /run/cloud-init/network-config-ready
and no loops are needed.
|
|
since we run from a udev event, this is sufficient.
udev settle will exit when either of
a.) the file exists
b.) the udev event queue has all been processed.
Since cloud-init-wait is being run as a udev event, 'b' cannot
be satisfied until it finishes. Thus, this essentially becomes a
inotify based wait for the file /run/cloud-init/network-config-ready
and no loops are needed.
|
|
|
|
I had left this in to commit it, it was my first pass at
cloud-init doing the naming itself. That design was then
replaced with the idea for cloud-init to instead write systemd.rules
files.
|
|
Note, still broken as cloud-init local is not going to ever touch the
CI_NET_READY file (/run/cloud-init/network-config-ready).
So as this is , it will actually just block for 60 seconds and go on.
|