ipatests: Add the remote IP before running ipa-migrate

The base class MigrationTest installation sets up two
separate servers, each with their own DNS. The second
one (replica[0]) is the "new" IPA server and will migrate
data from the "old" one (master).

When manually running these tests in my own environment
they fail because the new server can't connect to the old
one because it doesn't have its IP address. This somehow
works in PR-CI. So add the master IP address on the replica
so it has a way to contact it.

Fixes: https://pagure.io/freeipa/issue/9884

Signed-off-by: Rob Crittenden <rcritten@redhat.com>
Reviewed-By: Sudhir Menon <sumenon@redhat.com>
Reviewed-By: Rafael Guterres Jeffman <rjeffman@redhat.com>
This commit is contained in:
Rob Crittenden
2025-12-16 17:01:39 -03:00
committed by Rafael Guterres Jeffman
parent 381e00e5db
commit f28c8a2bc3
@@ -348,6 +348,11 @@ class MigrationTest(IntegrationTest):
tasks.install_master(cls.replicas[0], setup_dns=True, setup_kra=True,
extra_args=['--allow-zone-overlap'])
# Make sure the new server can communicate with the old one.
hosts = cls.replicas[0].get_file_contents(paths.HOSTS, encoding='utf-8')
hosts += f"\n{cls.master.ip}\t{cls.master.hostname}\n"
cls.replicas[0].put_file_contents(paths.HOSTS, hosts)
class TestIPAMigrateCLIOptions(MigrationTest):
"""