Browse Source

Merge "Simplify octavia post deploy configs" into stable/stein

changes/84/700984/1
Zuul 1 month ago
parent
commit
ec84c86b05
4 changed files with 25 additions and 26 deletions
  1. +9
    -21
      playbooks/roles/octavia-controller-config/tasks/octavia.yml
  2. +0
    -2
      playbooks/roles/octavia-controller-config/templates/manager-post-deploy.conf.j2
  3. +11
    -3
      playbooks/roles/octavia-controller-post-config/tasks/main.yml
  4. +5
    -0
      releasenotes/notes/fix-scattered-octavia-configs-2ef4f66ed1e02b60.yaml

+ 9
- 21
playbooks/roles/octavia-controller-config/tasks/octavia.yml View File

@@ -1,16 +1,9 @@
---
- 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 }}"
@@ -20,25 +13,20 @@
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
- name: gather facts about the service project
@@ -49,7 +37,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 }}"

+ 0
- 2
playbooks/roles/octavia-controller-config/templates/manager-post-deploy.conf.j2 View File

@@ -1,2 +0,0 @@
[health_manager]
bind_ip = {{ mgmt_port_ip }}

+ 11
- 3
playbooks/roles/octavia-controller-post-config/tasks/main.yml View File

@@ -11,7 +11,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
@@ -27,18 +27,26 @@
octavia_config_updated: true
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: octavia_config_updated

- name: create a symbolic link conf.d/post-deploy -> post-deploy.conf (LP#1836074)
file:
src: "../../post-deploy.conf"
dest: "{{ octavia_confd_prefix }}/etc/octavia/conf.d/common/post-deploy.conf"
state: link
selevel: s0
setype: svirt_sandbox_file_t

- name: restart octavia containers
become: true
become_user: root

+ 5
- 0
releasenotes/notes/fix-scattered-octavia-configs-2ef4f66ed1e02b60.yaml View File

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

Loading…
Cancel
Save