selftest: use correct DNS domain name for wrapper hosts file
authorRalph Boehme <slow@samba.org>
Thu, 14 Jan 2021 07:14:46 +0000 (08:14 +0100)
committerKarolin Seeger <kseeger@samba.org>
Wed, 27 Jan 2021 16:00:06 +0000 (16:00 +0000)
commit835fd283fec6965ce17f7d2c538312be474903c6
tree261f12e52b7558cc7a68a8ea782e5ba5f078ac20
parentc74fc2ab69a62b11f25b19a3de1462f0f9d97570
selftest: use correct DNS domain name for wrapper hosts file

For some reason the join fails to register the DNS records when provisioning the
member env:

   Using short domain name -- SAMBA2008R2
   Joined 'IDMAPADMEMBER' to dns domain 'samba2008r2.example.com'
   DNS Update for idmapadmember.samba.example.com failed: ERROR_DNS_UPDATE_FAILED

At the same time the hosts file used by the wrappers contains the wrong fqdn. As
a result the test that the next commit is going do add fails due do the broken
DNS resolution:

...
UNEXPECTED(failure): samba3.blackbox.winbind_ignore_domain.test_winbind_ignore_domains_ok_krb5(ad_member_idmap_ad:local)
REASON: Exception: Exception: do_connect: Connection to idmapadmember.samba2008r2.example.com failed (Error NT_STATUS_UNSUCCESSFUL)
...

Checking DNS in the testenv, first the working record for the main DC:

testenv$ dig @10.53.57.64 dc7.samba2008r2.example.com +short
10.53.57.27

testenv$ bin/samba-tool dns query dc7 samba2008r2.example.com dc7 A -U Administrator%locDCpass7
  Name=, Records=1, Children=0
    A: 10.53.57.27 (flags=f0, serial=1, ttl=900)

Now the failing idmapadmember:

testenv$ dig @10.53.57.64 idmapadmember.samba2008r2.example.com +short

testenv$ bin/samba-tool dns query dc7 samba2008r2.example.com idmapadmember A -U Administrator%locDCpass7
ERROR: Record or zone does not exist.

Fixing the hosts file lets the tests work, fixing the broken DNS record
registration is a task for another day.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14602

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit e1fc84138ca118c4187d87b7be4a7e6dd771dc4f)
selftest/target/Samba3.pm