selftest: Don't run KCC on backup testenvs (to avoid flappiness)
authorTim Beale <timbeale@catalyst.net.nz>
Wed, 5 Dec 2018 02:14:46 +0000 (15:14 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Thu, 6 Dec 2018 11:03:53 +0000 (12:03 +0100)
KCC onthe backup domain (i.e. backupfromdc, restoredc, offlinebackupdc)
can establish new connections for replication. Depending on timing,
this can cause the join_ldapcmp test to fail, because there's an extra
object under the NTDS Settings, at the point the ldapcmp is done.

We don't need any replication to happen on the backup domain. The
backup/restore workflow in the real world should mean that the restored DC
is never run in the same network as the original DC.

This patch updates the default KCC command for the backup testenvs to be
a no-op, so the DCs won't create new connection objects.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Thu Dec  6 12:03:53 CET 2018 on sn-devel-144

selftest/target/Samba4.pm

index c54942b61fd0cf5e69a2919917fad7468ed0eaa0..90d35d0bc3d9b20e526370ac78b9485e860b25f3 100755 (executable)
@@ -2744,7 +2744,8 @@ sub setup_backupfromdc
        my $provision_args = ["--site=Backup-Site"];
 
        my $env = $self->provision_ad_dc($path, "backupfromdc", "BACKUPDOMAIN",
-                                        "backupdom.samba.example.com", "",
+                                        "backupdom.samba.example.com",
+                                        "samba kcc command = /bin/true",
                                         $provision_args);
        unless ($env) {
                return undef;
@@ -2880,6 +2881,7 @@ sub prepare_dc_testenv
        $conf_options
        max xmit = 32K
        server max protocol = SMB2
+       samba kcc command = /bin/true
 
 [sysvol]
        path = $ctx->{statedir}/sysvol