Browse Source

Merge "[train-only] Fix unhealthy ovn_metadata_agent during hybrid state" into stable/train

changes/43/755343/2
Zuul 9 months ago
committed by Gerrit Code Review
parent
commit
3ba59ec9e9
2 changed files with 31 additions and 3 deletions
  1. +5
    -2
      deployment/ovn/ovn-controller-container-puppet.yaml
  2. +26
    -1
      deployment/ovn/ovn-metadata-container-puppet.yaml

+ 5
- 2
deployment/ovn/ovn-controller-container-puppet.yaml View File

@ -305,7 +305,10 @@ outputs:
shell: |
ovs-vsctl get open . external_ids:ovn-remote
register: ovn_remote
- name: Set fact - OVN SB connection string
set_fact:
ovn_sb_conn_str: "{{ [enable_internal_tls | bool | ternary('ssl','tcp'), ovn_dbs_vip | ipwrap, service_configs['ovn::southbound::port']] | join(':') }}"
- name: Set new ovn remote setting
shell: |
ovs-vsctl set open . external_ids:ovn-remote="tcp:{{ ovn_dbs_vip | ipwrap }}:6642"
when: ovn_dbs_vip not in ovn_remote.stdout
ovs-vsctl set open . external_ids:ovn-remote="{{ ovn_sb_conn_str }}"
when: ovn_sb_conn_str not in ovn_remote.stdout

+ 26
- 1
deployment/ovn/ovn-metadata-container-puppet.yaml View File

@ -366,4 +366,29 @@ outputs:
dest: /var/lib/neutron/kill_scripts/haproxy-kill
mode: 0755
content: {get_file: ../neutron/kill-script}
upgrade_tasks: []
upgrade_tasks:
- name: Switch ovn remote setting
tags:
- never
- nova_hybrid_state
when: step|int == 0
block:
- name: Get ovn remote setting in networking-ovn-metadata-agent.ini
shell: |
crudini --get /var/lib/config-data/puppet-generated/neutron/etc/neutron/plugins/networking-ovn/networking-ovn-metadata-agent.ini ovn ovn_sb_connection
register: ovn_remote
- name: Set fact - OVN SB connection string
set_fact:
ovn_sb_conn_str: "{{ [enable_internal_tls | bool | ternary('ssl','tcp'), ovn_dbs_vip | ipwrap, service_configs['ovn::southbound::port']] | join(':') }}"
- name: Set new ovn remote setting in networking-ovn-metadata-agent.ini
shell: |
crudini --set /var/lib/config-data/puppet-generated/neutron/etc/neutron/plugins/networking-ovn/networking-ovn-metadata-agent.ini ovn ovn_sb_connection "{{ ovn_sb_conn_str }}"
when: ovn_sb_conn_str not in ovn_remote.stdout
- name: Restart ovn_metadata_agent container to apply change in networking-ovn-metadata-agent.ini
docker_container:
name: ovn_metadata_agent
state: started
restart: True
comparisons:
'*': ignore
when: ovn_sb_conn_str not in ovn_remote.stdout

Loading…
Cancel
Save