From b0ee8e00aaad8d89baf3a751dd0f55f405d66394 Mon Sep 17 00:00:00 2001 From: Sergey Orlov Date: Tue, 16 Feb 2021 18:43:08 +0100 Subject: [PATCH] ipatests: always try to create A records for hosts in IPA domain Do not check that host is resolvable. systemd-resolved creates synthetic records for hosts in /etc/hosts. If test hosts are listed in /etc/hosts on controller, no A records will be created. Related to https://pagure.io/freeipa/issue/8703 Reviewed-By: Florence Blanc-Renaud --- ipatests/pytest_ipa/integration/tasks.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/ipatests/pytest_ipa/integration/tasks.py b/ipatests/pytest_ipa/integration/tasks.py index 7c0cb20d9..80a5e811d 100755 --- a/ipatests/pytest_ipa/integration/tasks.py +++ b/ipatests/pytest_ipa/integration/tasks.py @@ -55,7 +55,7 @@ from ipaplatform.paths import paths from ipaplatform.services import knownservices from ipapython.dn import DN from ipalib import errors -from ipalib.util import get_reverse_zone_default, verify_host_resolvable +from ipalib.util import get_reverse_zone_default from ipalib.constants import ( DEFAULT_CONFIG, DOMAIN_SUFFIX_NAME, DOMAIN_LEVEL_0, MIN_DOMAIN_LEVEL, MAX_DOMAIN_LEVEL @@ -1507,14 +1507,7 @@ def add_a_records_for_hosts_in_master_domain(master): for host in master.domain.hosts: # We don't need to take care of the zone creation since it is master # domain - try: - verify_host_resolvable(host.hostname) - logger.debug("The host (%s) is resolvable.", host.hostname) - except errors.DNSNotARecordError: - logger.debug("Hostname (%s) does not have A/AAAA record. Adding " - "new one.", - host.hostname) - add_a_record(master, host) + add_a_record(master, host) def add_a_record(master, host):