Ubuntu: avoid shadowing of networkd config files

Kayobe removes any systemd-networkd configuration generated by netplan,
since it can shadow our own configuration. This is performed via a
handler, but in practice it may run after the handler that restarts
systemd-networkd. This can leave the system using the netplan
configuration, which might not be correct. For example, if the interface
should be a bridge port.

This change fixes the issue by flushing handlers before importing the
systemd-networkd role.

Change-Id: I62ef7746aca4c6889526692cd0897e422937e70e
Story: 2004960
Task: 42415
This commit is contained in:
Mark Goddard 2021-04-30 13:50:24 +01:00
parent 42a1303737
commit c355935c9c

View File

@ -23,6 +23,11 @@
notify:
- Remove netplan systemd-networkd configuration
# NOTE(mgoddard): The above needs to fire before any restart of
# systemd-networkd, to avoid shadowing of our configuration files by those
# provided by netplan.
- meta: flush_handlers
- name: Configure systemd-networkd
import_role:
name: stackhpc.systemd_networkd