From 79dc2b994b5e7ac4abda715118094e6ba281642e Mon Sep 17 00:00:00 2001 From: wes hayutin Date: Wed, 22 Sep 2021 17:51:31 +0000 Subject: [PATCH] Revert "Ensure startup files exist before containers might be started" This reverts commit 27adf3bc7e6da4b12892956c48dd3a47b7470be8. Reason for revert: https://bugs.launchpad.net/tripleo/+bug/1944584 Tested Revert here: https://review.rdoproject.org/r/c/testproject/+/35737 Change-Id: I11c7fd78788617182e5848804a59f0d05554e413 --- .../octavia/octavia-api-container-puppet.yaml | 32 +++++----- deployment/octavia/octavia-base.yaml | 4 +- ...tavia-health-manager-container-puppet.yaml | 20 +++--- ...octavia-housekeeping-container-puppet.yaml | 18 +++--- .../octavia-worker-container-puppet.yaml | 64 +++++++++---------- 5 files changed, 64 insertions(+), 74 deletions(-) diff --git a/deployment/octavia/octavia-api-container-puppet.yaml b/deployment/octavia/octavia-api-container-puppet.yaml index 59179b2041..d22cba5260 100644 --- a/deployment/octavia/octavia-api-container-puppet.yaml +++ b/deployment/octavia/octavia-api-container-puppet.yaml @@ -376,23 +376,21 @@ outputs: environment: KOLLA_CONFIG_STRATEGY: COPY_ALWAYS host_prep_tasks: - list_concat: - - {get_attr: [OctaviaBase, role_data, host_prep_tasks]} - - - name: create persistent directories - file: - path: "{{ item.path }}" - state: directory - setype: "{{ item.setype }}" - mode: "{{ item.mode|default(omit) }}" - with_items: - - { 'path': /var/log/containers/octavia, 'setype': container_file_t, 'mode': '0750' } - - { 'path': /var/log/containers/httpd/octavia-api, 'setype': container_file_t, 'mode': '0750' } - - { 'path': /run/octavia, 'setype': container_file_t, 'mode': '0755' } - - name: ensure /run/octavia is present upon reboot - copy: - dest: /etc/tmpfiles.d/run-octavia.conf - content: | - d /run/octavia 0755 root root - - + - name: create persistent directories + file: + path: "{{ item.path }}" + state: directory + setype: "{{ item.setype }}" + mode: "{{ item.mode|default(omit) }}" + with_items: + - { 'path': /var/log/containers/octavia, 'setype': container_file_t, 'mode': '0750' } + - { 'path': /var/log/containers/httpd/octavia-api, 'setype': container_file_t, 'mode': '0750' } + - { 'path': /run/octavia, 'setype': container_file_t, 'mode': '0755' } + - name: ensure /run/octavia is present upon reboot + copy: + dest: /etc/tmpfiles.d/run-octavia.conf + content: | + d /run/octavia 0755 root root - - update_tasks: list_concat: - {get_attr: [OctaviaBase, role_data, update_tasks]} diff --git a/deployment/octavia/octavia-base.yaml b/deployment/octavia/octavia-base.yaml index 43b45a6d58..5145c039b9 100644 --- a/deployment/octavia/octavia-base.yaml +++ b/deployment/octavia/octavia-base.yaml @@ -303,7 +303,7 @@ outputs: - octavia_client_cert_set - {get_param: OctaviaClientCert} update_tasks: &ensure_start_up_files - - name: make sure that post-deploy.conf exists before starting containers + - name: make sure that post-deploy.conf exists before restarting containers on update or upgrade when: step|int == 5 block: - name: check for octavia post-deploy.conf file @@ -319,5 +319,3 @@ outputs: when: - octavia_post_deploy_stat.exists is defined and not octavia_post_deploy_stat.exists upgrade_tasks: *ensure_start_up_files - host_prep_tasks: *ensure_start_up_files - diff --git a/deployment/octavia/octavia-health-manager-container-puppet.yaml b/deployment/octavia/octavia-health-manager-container-puppet.yaml index 05dc2cebd4..fff721d986 100644 --- a/deployment/octavia/octavia-health-manager-container-puppet.yaml +++ b/deployment/octavia/octavia-health-manager-container-puppet.yaml @@ -187,17 +187,15 @@ outputs: update_tasks: {get_attr: [OctaviaBase, role_data, update_tasks]} upgrade_tasks: {get_attr: [OctaviaBase, role_data, upgrade_tasks]} host_prep_tasks: - list_concat: - - {get_attr: [OctaviaBase, role_data, host_prep_tasks]} - - - name: create persistent directories - file: - path: "{{ item.path }}" - state: directory - setype: "{{ item.setype }}" - mode: "{{ item.mode }}" - with_items: - - { 'path': /var/log/containers/octavia, 'setype': container_file_t, 'mode': '0750' } - - { 'path': /var/log/containers/octavia-amphorae, 'setype': container_file_t, 'mode': '0750' } + - name: create persistent directories + file: + path: "{{ item.path }}" + state: directory + setype: "{{ item.setype }}" + mode: "{{ item.mode }}" + with_items: + - { 'path': /var/log/containers/octavia, 'setype': container_file_t, 'mode': '0750' } + - { 'path': /var/log/containers/octavia-amphorae, 'setype': container_file_t, 'mode': '0750' } external_upgrade_tasks: - when: - step|int == 1 diff --git a/deployment/octavia/octavia-housekeeping-container-puppet.yaml b/deployment/octavia/octavia-housekeeping-container-puppet.yaml index da117060a0..1ff9b63341 100644 --- a/deployment/octavia/octavia-housekeeping-container-puppet.yaml +++ b/deployment/octavia/octavia-housekeeping-container-puppet.yaml @@ -143,16 +143,14 @@ outputs: update_tasks: {get_attr: [OctaviaBase, role_data, update_tasks]} upgrade_tasks: {get_attr: [OctaviaBase, role_data, upgrade_tasks]} host_prep_tasks: - list_concat: - - {get_attr: [OctaviaBase, role_data, host_prep_tasks]} - - - name: create persistent directories - file: - path: "{{ item.path }}" - state: directory - setype: "{{ item.setype }}" - mode: "{{ item.mode }}" - with_items: - - { 'path': /var/log/containers/octavia, 'setype': container_file_t, 'mode': '0750' } + - name: create persistent directories + file: + path: "{{ item.path }}" + state: directory + setype: "{{ item.setype }}" + mode: "{{ item.mode }}" + with_items: + - { 'path': /var/log/containers/octavia, 'setype': container_file_t, 'mode': '0750' } external_upgrade_tasks: - when: - step|int == 1 diff --git a/deployment/octavia/octavia-worker-container-puppet.yaml b/deployment/octavia/octavia-worker-container-puppet.yaml index 945ecc87e3..29ec1c7a10 100644 --- a/deployment/octavia/octavia-worker-container-puppet.yaml +++ b/deployment/octavia/octavia-worker-container-puppet.yaml @@ -129,40 +129,38 @@ outputs: environment: KOLLA_CONFIG_STRATEGY: COPY_ALWAYS host_prep_tasks: - list_concat: - - {get_attr: [OctaviaBase, role_data, host_prep_tasks]} - - - name: create persistent directories - file: - path: "{{ item.path }}" - state: directory - setype: "{{ item.setype }}" - mode: "{{ item.mode }}" - with_items: - - { 'path': /var/log/containers/octavia, 'setype': container_file_t, 'mode': '0750' } - - block: - - name: Ensure packages required for configuring octavia are present for CentOS 7 - package: - name: - - python2-neutronclient - - python2-openstackclient - - openssl - state: present - when: ansible_facts['distribution_major_version'] is version(8, '<') + - name: create persistent directories + file: + path: "{{ item.path }}" + state: directory + setype: "{{ item.setype }}" + mode: "{{ item.mode }}" + with_items: + - { 'path': /var/log/containers/octavia, 'setype': container_file_t, 'mode': '0750' } + - block: + - name: Ensure packages required for configuring octavia are present for CentOS 7 + package: + name: + - python2-neutronclient + - python2-openstackclient + - openssl + state: present + when: ansible_facts['distribution_major_version'] is version(8, '<') - - name: Ensure packages required for configuring octavia are present for CentOS/RHEL 8 - package: - name: - - python3-neutronclient - - python3-openstackclient - - openssl - state: present - when: ansible_facts['distribution_major_version'] is version(8, '>=') - when: {get_param: EnablePackageInstall} - - name: enable virt_sandbox_use_netlink for healthcheck - seboolean: - name: virt_sandbox_use_netlink - persistent: yes - state: yes + - name: Ensure packages required for configuring octavia are present for CentOS/RHEL 8 + package: + name: + - python3-neutronclient + - python3-openstackclient + - openssl + state: present + when: ansible_facts['distribution_major_version'] is version(8, '>=') + when: {get_param: EnablePackageInstall} + - name: enable virt_sandbox_use_netlink for healthcheck + seboolean: + name: virt_sandbox_use_netlink + persistent: yes + state: yes update_tasks: {get_attr: [OctaviaBase, role_data, update_tasks]} upgrade_tasks: {get_attr: [OctaviaBase, role_data, upgrade_tasks]} external_upgrade_tasks: