Merge "Override NetworkManager to wait for udev-settle"

This commit is contained in:
Zuul 2021-03-22 02:29:19 +00:00 committed by Gerrit Code Review
commit 4ef76474b8
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,3 @@
[Unit]
After=systemd-udev-settle.service
Wants=systemd-udev-settle.service

View File

@ -142,6 +142,23 @@ def main():
install('nm-no-resolv-handling.conf',
'/etc/NetworkManager/conf.d/nm-no-resolv-handling.conf',
mode='0644')
# NetworkManager has a "after" network-pre, and
# glean@<interface> services have a "before". However, if
# udev has not yet triggered and started the glean
# service, which it seems can be quite common in a slow
# environment like a binary-translated nested-vm, systemd
# may think it is fine to start NetworkManager because
# network-pre has been reached with no blockers. Thus we
# override NetworkManager to wait for udev-settle, which
# should ensure the glean service has started; which will
# block network-pre until it finishes writing out the
# configs.
install(
'nm-udev-settle.override',
'/etc/systemd/system/NetworkManager.service.d/override.conf',
mode='0644')
elif os.path.exists('/etc/init'):
log.info("Installing upstart services")
install('glean.conf', '/etc/init/glean.conf')