Dedup host entries in the exported data for stacks

Do not add extra host entries for VIPs for stacks deployed off the
exported data, since it already contains those entries

This is done by setting AddVipsToEtcHosts to False.
Then a stack is deployed, no more VIPs will be added into /etc/hosts
of the targeted hosts.

Change-Id: Iba03aed76fab1977e2b51ef69e8e08a493152ed6
Closes-bug: #1911792
Signed-off-by: Bogdan Dobrelya <bdobreli@redhat.com>
(cherry picked from commit e3c118756f)
(cherry picked from commit b8d57c0b6c)
changes/88/844488/1
Bogdan Dobrelya 2 years ago committed by Takashi Kajinami
parent c7327db995
commit 8c4f8b2d31
  1. 3
      tripleoclient/tests/v1/test_overcloud_export.py
  2. 3
      tripleoclient/v1/overcloud_export.py

@ -55,7 +55,8 @@ class TestOvercloudExport(utils.TestCommand):
False,
'/var/lib/mistral/overcloud')
self.assertEqual(
{'parameter_defaults': {'key': 'value',
{'parameter_defaults': {'AddVipsToEtcHosts': False,
'key': 'value',
'key0': 'value0'}},
mock_safe_dump.call_args[0][0])

@ -91,6 +91,9 @@ class ExportOvercloud(command.Command):
not parsed_args.no_password_excludes)
data.update(export.export_stack(
clients.orchestration, stack, False, config_download_dir))
# do not add extra host entries for VIPs for stacks deployed off that
# exported data, since it already contains those entries
data.update({'AddVipsToEtcHosts': False})
data = dict(parameter_defaults=data)
# write the exported data

Loading…
Cancel
Save