Mask lxc-net.service for systemd
On systemd-based systems, lxc-net is started whenever lxc is started. This is because lxc-net is declared as a dependency of lxc. We currently mask the service on upstart systems. We are presently manually configuring the lxcbr0 on all systems, systemd-based systems included. This patch will mask the lxc-net.service to enable lxcbr0 to be brought up without error due to conflicting lxc-net.service. Closes-Bug: #1580766 Change-Id: I099cf638bbb8874ca45b815383de8588fecbe7b6
This commit is contained in:
parent
9b3a6e2536
commit
196807bbda
@ -41,7 +41,7 @@
|
||||
tags:
|
||||
- lxc-net
|
||||
|
||||
# All installations of LXC on init based systems (upstart primarily) will need to have the
|
||||
# All installations of LXC will need to have the
|
||||
# the lxc-net service override in place to ensure its not restarted on system boot
|
||||
- name: Drop lxc-net override file for upstart
|
||||
template:
|
||||
@ -56,6 +56,17 @@
|
||||
- lxc-files
|
||||
- lxc-net
|
||||
|
||||
- name: Mask lxc-net systemd service
|
||||
file:
|
||||
src: /dev/null
|
||||
path: /etc/systemd/system/lxc-net.service
|
||||
state: link
|
||||
when:
|
||||
- pid1_name == "systemd"
|
||||
tags:
|
||||
- lxc-files
|
||||
- lxc-net
|
||||
|
||||
# All Debian based systems use the interfaces.d directory for extra network configs
|
||||
# this check ensures the needed source line is in the base config file
|
||||
- name: Ensure networking includes interfaces.d
|
||||
|
Loading…
Reference in New Issue
Block a user