Simplify octavia post deploy configs

Octavia shares config across multiple services in sometimes unexpected
ways. To avoid problems, this patch merges external deploy tasks
configuration into a single file.

Related-Bug: #1836074

Co-Authored-By: Brent Eagles <beagles@redhat.com>
Change-Id: I8da16dd77b77b8d81510cb1818f5d8c572080825
changes/11/687311/4
Carlos Goncalves 3 years ago
parent cffd4fc9d4
commit a8bdaf8d55
  1. 5
      releasenotes/notes/fix-scattered-octavia-configs-2ef4f66ed1e02b60.yaml
  2. 10
      tripleo_ansible/roles/octavia-controller-config/tasks/main.yml
  3. 32
      tripleo_ansible/roles/octavia-controller-config/tasks/octavia.yml
  4. 2
      tripleo_ansible/roles/octavia-controller-config/templates/manager-post-deploy.conf.j2
  5. 6
      tripleo_ansible/roles/octavia-controller-post-config/tasks/main.yml

@ -0,0 +1,5 @@
---
fixes:
- |
Fixed a configuration issue where required settings for Octavia services
were missing.

@ -11,15 +11,5 @@
- service_pem_content|length > 0
- include_tasks: netport.yml
- include_tasks: netinterface.yml
- name: making sure octavia common configuration directory exists
file:
path: "{{ octavia_confd_prefix }}/etc/octavia/conf.d/common"
state: directory
selevel: s0
setype: svirt_sandbox_file_t
become: true
- include_tasks: octavia.yml

@ -1,18 +1,10 @@
---
- name: making sure octavia worker configuration directory exists
file:
path: "{{ octavia_confd_prefix }}/etc/octavia/conf.d/octavia-worker"
state: directory
selevel: s0
setype: svirt_sandbox_file_t
become: true
- name: setting [controller_worker]/amp_boot_network_list
become: true
become_user: root
ini_file:
path: "{{ octavia_confd_prefix }}/etc/octavia/conf.d/common/post-deploy.conf"
path: "{{ octavia_confd_prefix }}/etc/octavia/post-deploy.conf"
section: controller_worker
option: amp_boot_network_list
value: "{{ lb_mgmt_net_id }}"
@ -23,27 +15,21 @@
become: true
become_user: root
ini_file:
path: "{{ octavia_confd_prefix }}/etc/octavia/conf.d/common/post-deploy.conf"
path: "{{ octavia_confd_prefix }}/etc/octavia/post-deploy.conf"
section: controller_worker
option: amp_secgroup_list
value: "{{ lb_mgmt_secgroup_id }}"
selevel: s0
setype: svirt_sandbox_file_t
- name: making sure octavia health manager configuration directory exists
file:
path: "{{ octavia_confd_prefix }}/etc/octavia/conf.d/octavia-health-manager"
state: directory
selevel: s0
setype: svirt_sandbox_file_t
become: true
- name: create octavia health manager configuration file
- name: setting [health_manager]/bind_ip
become: true
become_user: root
template:
dest: "{{ octavia_confd_prefix }}/etc/octavia/conf.d/octavia-health-manager/manager-post-deploy.conf"
src: "manager-post-deploy.conf.j2"
ini_file:
path: "{{ octavia_confd_prefix }}/etc/octavia/post-deploy.conf"
section: health_manager
option: bind_ip
value: "{{ mgmt_port_ip }}"
selevel: s0
setype: svirt_sandbox_file_t
@ -56,7 +42,7 @@
become: true
become_user: root
ini_file:
path: "{{ octavia_confd_prefix }}/etc/octavia/conf.d/common/post-deploy.conf"
path: "{{ octavia_confd_prefix }}/etc/octavia/post-deploy.conf"
section: controller_worker
option: amp_image_owner_id
value: "{{ project_id_result.stdout }}"

@ -18,7 +18,7 @@
become: true
become_user: root
shell: |
awk -F '=' -e '/^controller_ip_port_list/ { print $2; }' "{{ octavia_confd_prefix }}/etc/octavia/conf.d/octavia-worker/worker-post-deploy.conf"
awk -F '=' -e '/^controller_ip_port_list/ { print $2; }' "{{ octavia_confd_prefix }}/etc/octavia/post-deploy.conf"
register: config_contents
failed_when: config_contents.rc != 0
changed_when: false
@ -36,14 +36,14 @@
when:
- current_ip_list != o_hm_ip_list
- name: update octavia worker config file
- name: setting [health_manager]/controller_ip_port_list
become: true
become_user: root
ini_file:
section: "health_manager"
option: "controller_ip_port_list"
value: "{{ o_hm_ip_list }}"
path: "{{ octavia_confd_prefix }}/etc/octavia/conf.d/octavia-worker/worker-post-deploy.conf"
path: "{{ octavia_confd_prefix }}/etc/octavia/post-deploy.conf"
selevel: s0
setype: svirt_sandbox_file_t
when:

Loading…
Cancel
Save