Merge "Increase LXC container default shutdown delay"

This commit is contained in:
Zuul 2019-01-20 21:46:28 +00:00 committed by Gerrit Code Review
commit b8914bd419
4 changed files with 45 additions and 11 deletions

View File

@ -153,6 +153,9 @@ lxc_container_cache_files: []
# - "/etc/apt/sources.list.d/myrepo.list"
lxc_container_cache_files_from_host: []
# LXC container shutdown delay before force-killing running container
lxc_container_shutdown_delay: 60
# DNS servers to use during cache preparation
lxc_cache_prep_dns:
- "{{ lxc_net_address }}"

View File

@ -32,7 +32,8 @@
mode: "{{ item.mode|default('0644') }}"
with_items:
- { src: lxc-openstack.conf.j2, dest: "/etc/lxc/lxc-openstack.conf" }
- { src: lxc.default.j2, dest: "{{ system_config_dir }}/lxc-net", mode: "0644" }
- { src: lxc-net.default.j2, dest: "{{ system_config_dir }}/lxc-net", mode: "0644" }
- { src: lxc.default.j2, dest: "{{ system_config_dir }}/lxc", mode: "0644" }
- { src: lxc-system-manage.j2, dest: "/usr/local/bin/lxc-system-manage", mode: "0755" }
tags:
- lxc-files

View File

@ -0,0 +1,12 @@
# {{ ansible_managed }}
USE_LXC_BRIDGE="true"
LXC_BRIDGE="{{ lxc_net_bridge }}"
LXC_ADDR="{{ lxc_net_address }}"
LXC_NETMASK="{{ lxc_net_netmask }}"
LXC_NETWORK="${LXC_ADDR}/${LXC_NETMASK}"
LXC_DHCP_RANGE="{{ lxc_net_dhcp_range }}"
LXC_DHCP_MAX="{{ lxc_net_dhcp_max }}"
LXC_DNSMASQ_USER="{{ lxc_net_dnsmasq_user }}"
LXC_DHCP_CONFILE="{{ lxc_net_dhcp_config }}"
LXC_DOMAIN="{{ lxc_net_domain }}"

View File

@ -1,12 +1,30 @@
# {{ ansible_managed }}
USE_LXC_BRIDGE="true"
LXC_BRIDGE="{{ lxc_net_bridge }}"
LXC_ADDR="{{ lxc_net_address }}"
LXC_NETMASK="{{ lxc_net_netmask }}"
LXC_NETWORK="${LXC_ADDR}/${LXC_NETMASK}"
LXC_DHCP_RANGE="{{ lxc_net_dhcp_range }}"
LXC_DHCP_MAX="{{ lxc_net_dhcp_max }}"
LXC_DNSMASQ_USER="{{ lxc_net_dnsmasq_user }}"
LXC_DHCP_CONFILE="{{ lxc_net_dhcp_config }}"
LXC_DOMAIN="{{ lxc_net_domain }}"
# LXC_AUTO - whether or not to start containers at boot
LXC_AUTO="true"
# BOOTGROUPS - What groups should start on bootup?
# Comma separated list of groups.
# Leading comma, trailing comma or embedded double
# comma indicates when the NULL group should be run.
# Example (default): boot the onboot group first then the NULL group
BOOTGROUPS="onboot,"
# SHUTDOWNDELAY - Wait time for a container to shut down.
# Container shutdown can result in lengthy system
# shutdown times. Even 5 seconds per container can be
# too long.
SHUTDOWNDELAY="{{ lxc_container_shutdown_delay }}"
# OPTIONS can be used for anything else.
# If you want to boot everything then
# options can be "-a" or "-a -A".
OPTIONS=
# STOPOPTS are stop options. The can be used for anything else to stop.
# If you want to kill containers fast, use -k
STOPOPTS="-a -A -s"
USE_LXC_BRIDGE="false" # overridden in lxc-net
[ ! -f /etc/default/lxc-net ] || . /etc/default/lxc-net