Thanks a lot for your explanations and workaround examples.
I expanded our ansible update playbooks to check if
/etc/netplan/10-lxc.yaml is installed, then to remove that file, runs
"netplan apply" and then remove the package "netplan.io". It seems to
work in our environment, without loosing the network configuration while
updating and also after reboot.
Here is the ansible section we tested. Maybe it is helpful to anyone
else. This script comes with no warranty and should be tested in your
environment thoroughly.
- name: Is Netplan configuring LXC?
stat:
path: /etc/netplan/10-lxc.yaml
register: netplan
- name: Remove networkd/netplan configuration
file:
path: /etc/netplan/10-lxc.yaml
state: absent
when: "netplan.stat.exists == true and ansible_virtualization_type == 'lxc'"
- name: Reload networkd/netplan
command: netplan apply
when: "netplan.stat.exists == true and ansible_virtualization_type == 'lxc'"
- name: Remove netplan.io
apt:
name: netplan.io
state: absent
when: "netplan.stat.exists == true and ansible_virtualization_type == 'lxc'"
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1863873
Title:
Systemd fails to configure bridged network in LXC container
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1863873/+subscriptions
--
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs