diff options
| author | Michal Nasiadka <mnasiadka@gmail.com> | 2025-07-10 11:14:36 +0200 |
|---|---|---|
| committer | Michal Nasiadka <mnasiadka@gmail.com> | 2025-10-08 10:50:58 +0000 |
| commit | bdd98eca87890666f66b8b3d920f7ce0948ace44 (patch) | |
| tree | fd75424eb0769454dd0bb199e4ba13b88a5946f2 /tests/test-ovn.sh | |
| parent | 740147c43e986611da4357439693e08f3aee7913 (diff) | |
| download | kolla-ansible-bdd98eca87890666f66b8b3d920f7ce0948ace44.tar.gz kolla-ansible-bdd98eca87890666f66b8b3d920f7ce0948ace44.zip | |
ovn-db: Add OVN_NB_DB and OVN_SB_DB env variables
It will make running ovn-nbctl and ovn-sbctl working on all
nodes irrespective of their cluster role.
Excerpt from ovn-nbctl:
--db database
The OVSDB database remote to contact. If the OVN_NB_DB en‐
vironment variable is set, its value is used as the de‐
fault. Otherwise, the default is unix:/ovnnb_db.sock, but
this default is unlikely to be useful outside of single-ma‐
chine OVN test environments.
Closes-Bug: #2116313
Change-Id: I85f7bfd0aaa6f2d426ddb28950acbbca9d385aac
Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
Diffstat (limited to 'tests/test-ovn.sh')
| -rwxr-xr-x | tests/test-ovn.sh | 29 |
1 files changed, 25 insertions, 4 deletions
diff --git a/tests/test-ovn.sh b/tests/test-ovn.sh index a9d77a95a..a48fb1161 100755 --- a/tests/test-ovn.sh +++ b/tests/test-ovn.sh @@ -15,10 +15,20 @@ function test_ovn { # List OVN NB/SB entries echo "OVN NB DB entries:" - sudo ${container_engine} exec ovn_northd ovn-nbctl --db "$ovn_nb_connection" show + # TODO(mnasiadka): Remove the first part of conditional in G cycle + if [ $IS_UPGRADE == "yes" ]; then + sudo ${container_engine} exec ovn_northd ovn-nbctl --db "$ovn_nb_connection" show + else + sudo ${container_engine} exec ovn_northd ovn-nbctl show + fi echo "OVN SB DB entries:" - sudo ${container_engine} exec ovn_northd ovn-sbctl --db "$ovn_sb_connection" show + # TODO(mnasiadka): Remove the first part of conditional in G cycle + if [ $IS_UPGRADE == "yes" ]; then + sudo ${container_engine} exec ovn_northd ovn-sbctl --db "$ovn_sb_connection" show + else + sudo ${container_engine} exec ovn_northd ovn-sbctl show + 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) @@ -92,9 +102,20 @@ function test_octavia { openstack floating ip set $lb_fip --port $lb_port_id echo "OVN NB entries for LB:" - sudo ${container_engine} exec ovn_northd ovn-nbctl --db "$ovn_nb_connection" list load_balancer + # TODO(mnasiadka): Remove the first part of conditional in G cycle + if [ $IS_UPGRADE == "yes" ]; then + sudo ${container_engine} exec ovn_northd ovn-nbctl --db "$ovn_nb_connection" list load_balancer + else + sudo ${container_engine} exec ovn_northd ovn-nbctl list load_balancer + fi + echo "OVN NB entries for NAT:" - sudo ${container_engine} exec ovn_northd ovn-nbctl --db "$ovn_nb_connection" list nat + # TODO(mnasiadka): Remove the first part of conditional in G cycle + if [ $IS_UPGRADE == "yes" ]; then + sudo ${container_engine} exec ovn_northd ovn-nbctl --db "$ovn_nb_connection" list nat + else + sudo ${container_engine} exec ovn_northd ovn-nbctl list nat + fi echo "Attempt to access the load balanced HTTP server." attempts=12 |
