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.
Note: this is a semantic backport of https://review.opendev.org/#/c/687311/
Related-Bug: #1836074
Co-Authored-By: Brent Eagles <beagles@redhat.com>
Change-Id: I081330c28c967aa000ec89f255876d5386599a78
(cherry picked from commit 1ecf1827d5
)
This commit is contained in:
parent
b743cfaa25
commit
bde1943e13
|
@ -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 }}"
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
[health_manager]
|
||||
bind_ip = {{ mgmt_port_ip }}
|
|
@ -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
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixed a configuration issue where required settings for Octavia services
|
||||
were missing.
|
Loading…
Reference in New Issue