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
This commit is contained in:
parent
cffd4fc9d4
commit
a8bdaf8d55
|
@ -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
|
- service_pem_content|length > 0
|
||||||
|
|
||||||
- include_tasks: netport.yml
|
- include_tasks: netport.yml
|
||||||
|
|
||||||
- include_tasks: netinterface.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
|
- 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
|
- name: setting [controller_worker]/amp_boot_network_list
|
||||||
become: true
|
become: true
|
||||||
become_user: root
|
become_user: root
|
||||||
ini_file:
|
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
|
section: controller_worker
|
||||||
option: amp_boot_network_list
|
option: amp_boot_network_list
|
||||||
value: "{{ lb_mgmt_net_id }}"
|
value: "{{ lb_mgmt_net_id }}"
|
||||||
|
@ -23,27 +15,21 @@
|
||||||
become: true
|
become: true
|
||||||
become_user: root
|
become_user: root
|
||||||
ini_file:
|
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
|
section: controller_worker
|
||||||
option: amp_secgroup_list
|
option: amp_secgroup_list
|
||||||
value: "{{ lb_mgmt_secgroup_id }}"
|
value: "{{ lb_mgmt_secgroup_id }}"
|
||||||
selevel: s0
|
selevel: s0
|
||||||
setype: svirt_sandbox_file_t
|
setype: svirt_sandbox_file_t
|
||||||
|
|
||||||
- name: making sure octavia health manager configuration directory exists
|
- name: setting [health_manager]/bind_ip
|
||||||
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
|
|
||||||
become: true
|
become: true
|
||||||
become_user: root
|
become_user: root
|
||||||
template:
|
ini_file:
|
||||||
dest: "{{ octavia_confd_prefix }}/etc/octavia/conf.d/octavia-health-manager/manager-post-deploy.conf"
|
path: "{{ octavia_confd_prefix }}/etc/octavia/post-deploy.conf"
|
||||||
src: "manager-post-deploy.conf.j2"
|
section: health_manager
|
||||||
|
option: bind_ip
|
||||||
|
value: "{{ mgmt_port_ip }}"
|
||||||
selevel: s0
|
selevel: s0
|
||||||
setype: svirt_sandbox_file_t
|
setype: svirt_sandbox_file_t
|
||||||
|
|
||||||
|
@ -56,7 +42,7 @@
|
||||||
become: true
|
become: true
|
||||||
become_user: root
|
become_user: root
|
||||||
ini_file:
|
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
|
section: controller_worker
|
||||||
option: amp_image_owner_id
|
option: amp_image_owner_id
|
||||||
value: "{{ project_id_result.stdout }}"
|
value: "{{ project_id_result.stdout }}"
|
||||||
|
|
|
@ -1,2 +0,0 @@
|
||||||
[health_manager]
|
|
||||||
bind_ip = {{ mgmt_port_ip }}
|
|
|
@ -18,7 +18,7 @@
|
||||||
become: true
|
become: true
|
||||||
become_user: root
|
become_user: root
|
||||||
shell: |
|
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
|
register: config_contents
|
||||||
failed_when: config_contents.rc != 0
|
failed_when: config_contents.rc != 0
|
||||||
changed_when: false
|
changed_when: false
|
||||||
|
@ -36,14 +36,14 @@
|
||||||
when:
|
when:
|
||||||
- current_ip_list != o_hm_ip_list
|
- current_ip_list != o_hm_ip_list
|
||||||
|
|
||||||
- name: update octavia worker config file
|
- name: setting [health_manager]/controller_ip_port_list
|
||||||
become: true
|
become: true
|
||||||
become_user: root
|
become_user: root
|
||||||
ini_file:
|
ini_file:
|
||||||
section: "health_manager"
|
section: "health_manager"
|
||||||
option: "controller_ip_port_list"
|
option: "controller_ip_port_list"
|
||||||
value: "{{ o_hm_ip_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
|
selevel: s0
|
||||||
setype: svirt_sandbox_file_t
|
setype: svirt_sandbox_file_t
|
||||||
when:
|
when:
|
||||||
|
|
Loading…
Reference in New Issue