[PATCH] Don't run KCC on backup testenvs to avoid test flappiness

Tim Beale timbeale at catalyst.net.nz
Thu Dec 6 00:44:05 UTC 2018


The join_ldapcmp test has become a bit flappy. It appears that,
depending on timing, the KCC can come along and create a new connection
under NTDS Settings, which causes the ldapcmp to then fail.

This patch attempts to avoid the problem by disabling the default KCC
script on the backup testenvs.

Merge request: https://gitlab.com/samba-team/samba/merge_requests/138

CI pass: https://gitlab.com/catalyst-samba/samba/pipelines/38985051

Review appreciated. Thanks.


-------------- next part --------------
From 3d0a7ba4f00e6e24408aff0d5f6020105ce71a8a Mon Sep 17 00:00:00 2001
From: Tim Beale <timbeale at catalyst.net.nz>
Date: Wed, 5 Dec 2018 15:14:46 +1300
Subject: [PATCH] selftest: Don't run KCC on backup testenvs (to avoid
 flappiness)

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 at catalyst.net.nz>
---
 selftest/target/Samba4.pm | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index c54942b..90d35d0 100755
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -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
-- 
2.7.4



More information about the samba-technical mailing list