ovn: Fix broken deployment/reconfig on Ubuntu
Initially Ubuntu/Debian used /var/run/openvswitch as default OVN run dir, it seems it has changed long time ago - but we haven't picked that up on latest OVN DB refactor. Adding in OVN and OVN upgrade Debian jobs to enhance coverage. Closes-Bug: #2035584 Change-Id: I78967c4499269578ac921ad9a553946b65e1293f
This commit is contained in:
parent
428acfe97f
commit
f6d0ffd61c
@ -94,5 +94,3 @@ ovn_sb_command: >-
|
||||
--db-sb-pidfile=/run/ovn/ovnsb_db.pid
|
||||
--db-sb-file=/var/lib/openvswitch/ovn-sb/ovnsb.db
|
||||
--ovn-sb-logfile=/var/log/kolla/openvswitch/ovn-sb-db.log
|
||||
|
||||
ovn_db_path: "{{ '/var/run/openvswitch' if kolla_base_distro in ['debian', 'ubuntu'] else '/var/run/ovn' }}"
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
- name: Check NB cluster status
|
||||
command: >
|
||||
{{ kolla_container_engine }} exec ovn_nb_db ovs-appctl -t {{ ovn_db_path }}/ovnnb_db.ctl
|
||||
{{ kolla_container_engine }} exec ovn_nb_db ovs-appctl -t /var/run/ovn/ovnnb_db.ctl
|
||||
cluster/status OVN_Northbound
|
||||
become: true
|
||||
changed_when: false
|
||||
@ -24,7 +24,7 @@
|
||||
|
||||
- name: Check SB cluster status
|
||||
command: >
|
||||
{{ kolla_container_engine }} exec ovn_sb_db ovs-appctl -t {{ ovn_db_path }}/ovnsb_db.ctl
|
||||
{{ kolla_container_engine }} exec ovn_sb_db ovs-appctl -t /var/run/ovn/ovnsb_db.ctl
|
||||
cluster/status OVN_Southbound
|
||||
become: true
|
||||
changed_when: false
|
||||
@ -37,7 +37,7 @@
|
||||
ovn_nb_old_node: "{{ ovn_nb_db_cluster_status | regex_search('\\((\\w{4}) at tcp:' + api_interface_address + ':6643\\)', '\\1') | first }}"
|
||||
become: true
|
||||
command: >
|
||||
{{ kolla_container_engine }} exec ovn_nb_db ovs-appctl -t {{ ovn_db_path }}/ovnnb_db.ctl
|
||||
{{ kolla_container_engine }} exec ovn_nb_db ovs-appctl -t /var/run/ovn/ovnnb_db.ctl
|
||||
cluster/kick OVN_Northbound {{ ovn_nb_old_node }}
|
||||
when:
|
||||
- ovn_nb_db_cluster_status.stdout is defined
|
||||
@ -49,7 +49,7 @@
|
||||
ovn_sb_old_node: "{{ ovn_sb_db_cluster_status | regex_search('\\((\\w{4}) at tcp:' + api_interface_address + ':6644\\)', '\\1') | first }}"
|
||||
become: true
|
||||
command: >
|
||||
{{ kolla_container_engine }} exec ovn_sb_db ovs-appctl -t {{ ovn_db_path }}/ovnsb_db.ctl
|
||||
{{ kolla_container_engine }} exec ovn_sb_db ovs-appctl -t /var/run/ovn/ovnsb_db.ctl
|
||||
cluster/kick OVN_Southbound {{ ovn_sb_old_node }}
|
||||
when:
|
||||
- ovn_sb_db_cluster_status.stdout is defined
|
||||
|
@ -20,14 +20,8 @@ function test_ovn {
|
||||
echo "OVN SB DB entries:"
|
||||
sudo ${container_engine} exec ovn_northd ovn-sbctl --db "$ovn_sb_connection" show
|
||||
|
||||
# Test OVSDB cluster state
|
||||
if [[ $BASE_DISTRO =~ ^(debian|ubuntu)$ ]]; then
|
||||
OVNNB_STATUS=$(sudo ${container_engine} exec ovn_nb_db ovs-appctl -t /var/run/openvswitch/ovnnb_db.ctl cluster/status OVN_Northbound)
|
||||
OVNSB_STATUS=$(sudo ${container_engine} exec ovn_sb_db ovs-appctl -t /var/run/openvswitch/ovnsb_db.ctl cluster/status OVN_Southbound)
|
||||
else
|
||||
OVNNB_STATUS=$(sudo ${container_engine} exec ovn_nb_db ovs-appctl -t /var/run/ovn/ovnnb_db.ctl cluster/status OVN_Northbound)
|
||||
OVNSB_STATUS=$(sudo ${container_engine} exec ovn_sb_db ovs-appctl -t /var/run/ovn/ovnsb_db.ctl cluster/status OVN_Southbound)
|
||||
fi
|
||||
OVNNB_STATUS=$(sudo ${container_engine} exec ovn_nb_db ovs-appctl -t /var/run/ovn/ovnnb_db.ctl cluster/status OVN_Northbound)
|
||||
OVNSB_STATUS=$(sudo ${container_engine} exec ovn_sb_db ovs-appctl -t /var/run/ovn/ovnsb_db.ctl cluster/status OVN_Southbound)
|
||||
|
||||
if [[ $(grep -o "at tcp:" <<< ${OVNNB_STATUS} | wc -l) != "3" ]]; then
|
||||
echo "ERR: NB Cluster does not have 3 nodes"
|
||||
|
@ -173,6 +173,15 @@
|
||||
base_distro: rocky
|
||||
is_upgrade: yes
|
||||
|
||||
- job:
|
||||
name: kolla-ansible-debian-upgrade-ovn
|
||||
parent: kolla-ansible-ovn-base
|
||||
nodeset: kolla-ansible-debian-bookworm-multi
|
||||
timeout: 9000
|
||||
vars:
|
||||
base_distro: debian
|
||||
is_upgrade: yes
|
||||
|
||||
- job:
|
||||
name: kolla-ansible-ubuntu-upgrade-ovn
|
||||
parent: kolla-ansible-ovn-base
|
||||
@ -352,6 +361,13 @@
|
||||
vars:
|
||||
base_distro: rocky
|
||||
|
||||
- job:
|
||||
name: kolla-ansible-debian-ovn
|
||||
parent: kolla-ansible-ovn-base
|
||||
nodeset: kolla-ansible-debian-bookworm-multi
|
||||
vars:
|
||||
base_distro: debian
|
||||
|
||||
- job:
|
||||
name: kolla-ansible-ubuntu-ovn
|
||||
parent: kolla-ansible-ovn-base
|
||||
|
@ -44,10 +44,13 @@
|
||||
- kolla-ansible-rocky9-cells
|
||||
- kolla-ansible-rocky9-mariadb
|
||||
- kolla-ansible-ubuntu-mariadb
|
||||
- kolla-ansible-debian-ovn
|
||||
- kolla-ansible-rocky9-ovn
|
||||
- kolla-ansible-ubuntu-ovn
|
||||
- kolla-ansible-debian-upgrade-ovn
|
||||
- kolla-ansible-rocky9-upgrade-ovn
|
||||
- kolla-ansible-ubuntu-upgrade-ovn
|
||||
- kolla-ansible-debian
|
||||
- kolla-ansible-rocky9-prometheus-opensearch
|
||||
- kolla-ansible-ubuntu-prometheus-opensearch
|
||||
- kolla-ansible-rocky9-prometheus-opensearch-upgrade
|
||||
|
Loading…
Reference in New Issue
Block a user