Also export OVN DBs IPs for multi-stack inputs

When cell computes do not have external_ids:ovn-remote configured
for OVN, it breaks.

Running manually:

ovs-vsctl set open . external_ids:ovn-remote="ssl:<ovn_dns_vip>:6642"

(or by DBs IPs) fixes it and ovn-controller connects the db and adds
the Chassis.

Fix multi-cell/multi-stack exports by also exporting ovn_dbs_node_ips.
So that when there is no ovn_dbs_vip data in hiera (i.e. no value for
t-h-t OVNDBsVirtualFixedIPs), there are still ovn_dbs_node_ips data to
have things configured properly for OVN on computes.

Change-Id: Ib49156d49a7f8e4544f5b73d15a4ad32dba77c98
Related: rhbz#2137904
Signed-off-by: Bogdan Dobrelya <>
(cherry picked from commit 28d15c2798)
This commit is contained in:
Bogdan Dobrelya 2022-12-05 16:37:02 +01:00
parent 8b9c3b6bd9
commit 1a5eab6c20
2 changed files with 5 additions and 2 deletions

View File

@ -250,6 +250,7 @@ EXPORT_DATA = {

View File

@ -128,13 +128,15 @@ class TestExport(TestCase):
working_dir = utils.get_default_working_dir('overcloud')
mock_stack_output.side_effect = self._get_stack_saved_output_item
self.mock_open = mock.mock_open(
with mock.patch('', self.mock_open):
data = export.export_stack(
working_dir, "overcloud", should_filter=True)
expected = \
{'AllNodesExtraMapData': {u'ovn_dbs_vip': u'vip'},
{'AllNodesExtraMapData': {u'ovn_dbs_vip': u'vip',
u'ovn_dbs_node_ips': [1, 2]},
'AuthCloudName': 'central',
'EndpointMapOverride': {'em_key': 'em_value'},
'ExtraHostFileEntries': 'hosts entry',