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 <bdobreli@redhat.com>
This commit is contained in:
Bogdan Dobrelya 2022-12-05 16:37:02 +01:00
parent eb0f82b98d
commit 28d15c2798
2 changed files with 5 additions and 2 deletions

View File

@ -250,6 +250,7 @@ EXPORT_DATA = {
"oslo_messaging_rpc_node_names",
"memcached_node_ips",
"ovn_dbs_vip",
"ovn_dbs_node_ips",
"redis_vip"]},
}

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(
read_data='{"an_key":"an_value","ovn_dbs_vip":"vip"}')
read_data=('{"an_key":"an_value","ovn_dbs_vip":"vip",'
'"ovn_dbs_node_ips":[1,2]}'))
with mock.patch('builtins.open', 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',