From f16c08b7d68c8b6dc9871077ca057871ff54a795 Mon Sep 17 00:00:00 2001 From: Sergey Orlov Date: Fri, 1 Nov 2019 10:20:53 +0100 Subject: [PATCH] ipatests: in DNS zone file add A record for name server Testcase test_server_option_with_unreachable_ad creates a zone file for AD domain. This file had a hard-coded A record for host specified in NS record. Some versions of BIND consider this zone invalid and refuse to start with message: ``` zone ad.test/IN: NS 'root-dc.ad.test' has no address records (A or AAAA) ``` Fixed by replacing hard-coded value with short name of the AD instance. Reviewed-By: Michal Polovka --- ipatests/test_integration/test_trust.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ipatests/test_integration/test_trust.py b/ipatests/test_integration/test_trust.py index 8f6b7a2f8..505a32974 100644 --- a/ipatests/test_integration/test_trust.py +++ b/ipatests/test_integration/test_trust.py @@ -632,7 +632,7 @@ class TestTrust(BaseTestTrust): _ldap._tcp IN SRV 0 100 389 unreachable.{ad_dom}. _kerberos._udp IN SRV 0 100 88 unreachable.{ad_dom}. _kpasswd._udp IN SRV 0 100 464 unreachable.{ad_dom}. - ad1 IN A {ad_ip} + {ad_short} IN A {ad_ip} unreachable IN A {unreachable} DomainDnsZones IN A {ad_ip} _ldap._tcp.Default-First-Site-Name._sites.DomainDnsZones IN SRV 0 100 389 unreachable.{ad_dom}. @@ -642,7 +642,8 @@ class TestTrust(BaseTestTrust): _ldap._tcp.ForestDnsZones IN SRV 0 100 389 unreachable.{ad_dom}. '''.format( # noqa: E501 ad_ip=self.ad.ip, unreachable='192.168.254.254', - ad_host=self.ad.hostname, ad_dom=self.ad.domain.name)) + ad_host=self.ad.hostname, ad_dom=self.ad.domain.name, + ad_short=self.ad.shortname)) ad_zone_file = tasks.create_temp_file(self.master, directory='/etc') self.master.put_file_contents(ad_zone_file, ad_zone) self.master.run_command(