From 38e674c5cc0687a006f15ecc4e9787358c91205e Mon Sep 17 00:00:00 2001 From: Kevin Carter Date: Thu, 24 Aug 2017 22:22:20 -0500 Subject: [PATCH] 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 --- playbooks/common-playbooks/cinder.yml | 2 +- playbooks/common-playbooks/neutron.yml | 2 +- playbooks/common-playbooks/nova.yml | 2 +- playbooks/common-tasks/os-lxc-container-setup.yml | 2 +- playbooks/galera-install.yml | 2 +- playbooks/os-keystone-install.yml | 2 +- playbooks/os-molteniron-install.yml | 2 +- playbooks/os-swift-install.yml | 2 +- playbooks/rabbitmq-install.yml | 2 +- playbooks/rsyslog-install.yml | 2 +- 10 files changed, 10 insertions(+), 10 deletions(-) diff --git a/playbooks/common-playbooks/cinder.yml b/playbooks/common-playbooks/cinder.yml index bf5f9ea8da..dac0674375 100644 --- a/playbooks/common-playbooks/cinder.yml +++ b/playbooks/common-playbooks/cinder.yml @@ -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" diff --git a/playbooks/common-playbooks/neutron.yml b/playbooks/common-playbooks/neutron.yml index c0728839f4..99b97b0d9f 100644 --- a/playbooks/common-playbooks/neutron.yml +++ b/playbooks/common-playbooks/neutron.yml @@ -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" diff --git a/playbooks/common-playbooks/nova.yml b/playbooks/common-playbooks/nova.yml index 95a6ae0f87..0599b45a1e 100644 --- a/playbooks/common-playbooks/nova.yml +++ b/playbooks/common-playbooks/nova.yml @@ -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 diff --git a/playbooks/common-tasks/os-lxc-container-setup.yml b/playbooks/common-tasks/os-lxc-container-setup.yml index b59f0bb7ca..e776f3ed30 100644 --- a/playbooks/common-tasks/os-lxc-container-setup.yml +++ b/playbooks/common-tasks/os-lxc-container-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: diff --git a/playbooks/galera-install.yml b/playbooks/galera-install.yml index fdbdc480ba..175b72698e 100644 --- a/playbooks/galera-install.yml +++ b/playbooks/galera-install.yml @@ -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) }}" diff --git a/playbooks/os-keystone-install.yml b/playbooks/os-keystone-install.yml index e9b0216ffe..64179054db 100644 --- a/playbooks/os-keystone-install.yml +++ b/playbooks/os-keystone-install.yml @@ -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 diff --git a/playbooks/os-molteniron-install.yml b/playbooks/os-molteniron-install.yml index 94e25438cc..fcf39b7a0c 100644 --- a/playbooks/os-molteniron-install.yml +++ b/playbooks/os-molteniron-install.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: diff --git a/playbooks/os-swift-install.yml b/playbooks/os-swift-install.yml index 8067e983c4..ed712d121b 100644 --- a/playbooks/os-swift-install.yml +++ b/playbooks/os-swift-install.yml @@ -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: diff --git a/playbooks/rabbitmq-install.yml b/playbooks/rabbitmq-install.yml index bc99cbdc51..862bc44b7b 100644 --- a/playbooks/rabbitmq-install.yml +++ b/playbooks/rabbitmq-install.yml @@ -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" diff --git a/playbooks/rsyslog-install.yml b/playbooks/rsyslog-install.yml index f7e265c194..41b8d543fb 100644 --- a/playbooks/rsyslog-install.yml +++ b/playbooks/rsyslog-install.yml @@ -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"