Fix LXC container start order
The lxc container configuration option to start containers in a particular order is not working as expected. The ordering integer was in reverse and if we do not set the "lxc.start.order" option on all containers within a given host the LXC system start will start all containers that do NOT have the option set first and then start the rest of the containers using the start integer in numeric order. This change inverts the start order integers we had set and defines a default start order option at 100. Change-Id: Ief6213d6c7c65f031d4c139db103e5c29e0db5ec Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
parent
691c59f25e
commit
38e674c5cc
@ -50,7 +50,7 @@
|
||||
- "lxc.cgroup.devices.allow=a *:* rmw"
|
||||
- "lxc.mount.entry=udev dev devtmpfs defaults 0 0"
|
||||
extra_container_config_no_restart:
|
||||
- "lxc.start.order=79"
|
||||
- "lxc.start.order=39"
|
||||
when:
|
||||
- "'cinder_volume' in group_names"
|
||||
- "cinder_backend_lvm_inuse | bool"
|
||||
|
@ -38,7 +38,7 @@
|
||||
extra_container_config:
|
||||
- "lxc.cgroup.devices.allow=a *:* rmw"
|
||||
extra_container_config_no_restart:
|
||||
- "lxc.start.order=79"
|
||||
- "lxc.start.order=29"
|
||||
when:
|
||||
- "'neutron_agent' in group_names"
|
||||
|
||||
|
@ -65,7 +65,7 @@
|
||||
include: ../common-tasks/os-lxc-container-setup.yml
|
||||
vars:
|
||||
extra_container_config_no_restart:
|
||||
- "lxc.start.order=69"
|
||||
- "lxc.start.order=39"
|
||||
|
||||
- name: Configure log directories (on metal)
|
||||
include: ../common-tasks/os-log-dir-setup.yml
|
||||
|
@ -82,7 +82,7 @@
|
||||
line: "{{ item.split('=')[0] }} = {{ item.split('=', 1)[1] }}"
|
||||
insertafter: "^{{ item.split('=')[0] }}"
|
||||
backup: "true"
|
||||
with_items: "{{ extra_container_config_no_restart | default([]) }}"
|
||||
with_items: "{{ extra_container_config_no_restart | default(['lxc.start.order=100']) }}"
|
||||
delegate_to: "{{ physical_host }}"
|
||||
when: not is_metal | bool
|
||||
tags:
|
||||
|
@ -35,7 +35,7 @@
|
||||
vars:
|
||||
list_of_bind_mounts: "{{ galera_container_bind_mounts }}"
|
||||
extra_container_config_no_restart:
|
||||
- "lxc.start.order=99"
|
||||
- "lxc.start.order=10"
|
||||
- include: common-tasks/package-cache-proxy.yml
|
||||
vars:
|
||||
is_metal: "{{ properties.is_metal|default(false) }}"
|
||||
|
@ -92,7 +92,7 @@
|
||||
include: common-tasks/os-lxc-container-setup.yml
|
||||
vars:
|
||||
extra_container_config_no_restart:
|
||||
- "lxc.start.order=89"
|
||||
- "lxc.start.order=19"
|
||||
|
||||
- name: Configure log directories (on metal)
|
||||
include: common-tasks/os-log-dir-setup.yml
|
||||
|
@ -27,7 +27,7 @@
|
||||
- include: common-tasks/os-lxc-container-setup.yml
|
||||
vars:
|
||||
extra_container_config_no_restart:
|
||||
- "lxc.start.order=79"
|
||||
- "lxc.start.order=39"
|
||||
- include: common-tasks/os-log-dir-setup.yml
|
||||
vars:
|
||||
log_dirs:
|
||||
|
@ -28,7 +28,7 @@
|
||||
- include: common-tasks/os-lxc-container-setup.yml
|
||||
vars:
|
||||
extra_container_config_no_restart:
|
||||
- "lxc.start.order=79"
|
||||
- "lxc.start.order=39"
|
||||
- include: common-tasks/os-log-dir-setup.yml
|
||||
vars:
|
||||
log_dirs:
|
||||
|
@ -30,7 +30,7 @@
|
||||
static:
|
||||
vars:
|
||||
extra_container_config_no_restart:
|
||||
- "lxc.start.order=99"
|
||||
- "lxc.start.order=19"
|
||||
- include: common-tasks/package-cache-proxy.yml
|
||||
roles:
|
||||
- role: "system_crontab_coordination"
|
||||
|
@ -31,7 +31,7 @@
|
||||
- bind_dir_path: "{{ rsyslog_server_storage_directory }}"
|
||||
mount_path: "/openstack/{{ inventory_hostname }}/log-storage"
|
||||
extra_container_config_no_restart:
|
||||
- "lxc.start.order=99"
|
||||
- "lxc.start.order=19"
|
||||
- include: common-tasks/package-cache-proxy.yml
|
||||
roles:
|
||||
- role: "rsyslog_server"
|
||||
|
Loading…
Reference in New Issue
Block a user