[PATCH] Re: The flapping posixacl.py test
Andrew Bartlett
abartlet at samba.org
Thu Jun 15 04:39:43 UTC 2017
On Thu, 2017-06-15 at 16:10 +1200, Andrew Bartlett wrote:
> On Thu, 2017-06-15 at 15:43 +1200, Andrew Bartlett via samba-
> technical
> wrote:
> > Here are some notes on the flapping posixacl.py test:
> >
> > You can line up the printed ACL against the ACL expected in
> > posix.acl.py, but I've added the index number at the start of the
> > first
> > five blocks to help you line it up.
> >
> > What is going on is that the well known groups are being mapped to
> > a
> > GID, not a BOTH, which is what the code expects:
>
> This appears to be due to a slow startup of winbindd. When we force
> winbindd to be very slow to start, it fails reliably. I'm looking
> into
> making sure wbinfo -p returns successfully before any tests start.
>
> My guess is that the 'legacy fallback' calls behave differently to
> the
> winbindd online calls, which we may wish to look into.
The attached patches ensure that winbindd is started before we consider
the AD DC live.
Please review/push!
Thanks,
Andrew Bartlett
--
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team https://samba.org
Samba Development and Support, Catalyst IT
https://catalyst.net.nz/services/samba
-------------- next part --------------
From 5676916e3bbdd2e00d0a1604e427271d0a3782aa Mon Sep 17 00:00:00 2001
From: Andrew Bartlett <abartlet at samba.org>
Date: Thu, 15 Jun 2017 16:19:17 +1200
Subject: [PATCH 1/2] selftest: Correctly print message when nbt is not up in
20 seconds
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12843
---
selftest/target/Samba4.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index 316ef8346d9..c52c99b1759 100755
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -207,7 +207,7 @@ sub wait_for_start($$)
}
$count++;
} while ($ret != 0 && $count < 20);
- if ($count == 10) {
+ if ($count == 20) {
warn("nbt not reachable after 20 retries\n");
teardown_env($self, $testenv_vars);
return 0;
--
2.11.0
From 305b2220242e1d1a6032fca498b40e24b96bb0aa Mon Sep 17 00:00:00 2001
From: Andrew Bartlett <abartlet at samba.org>
Date: Thu, 15 Jun 2017 16:20:11 +1200
Subject: [PATCH 2/2] selftest: Also wait for winbindd to start
This ensures that the posixacl.py test does not race against winbindd starting up and so
give wrong mappings
Signed-off-by: Andrew Bartlett <abartlet at samba.org>
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12843
---
selftest/target/Samba4.pm | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm
index c52c99b1759..ea81d7dd9da 100755
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -245,6 +245,28 @@ sub wait_for_start($$)
sleep(1);
}
}
+
+ my $wbinfo = Samba::bindir_path($self, "wbinfo");
+
+ $count = 0;
+ do {
+ my $cmd = "NSS_WRAPPER_PASSWD=$testenv_vars->{NSS_WRAPPER_PASSWD} ";
+ $cmd .= "NSS_WRAPPER_GROUP=$testenv_vars->{NSS_WRAPPER_GROUP} ";
+ $cmd .= "SELFTEST_WINBINDD_SOCKET_DIR=$testenv_vars->{SELFTEST_WINBINDD_SOCKET_DIR} ";
+ $cmd .= "$wbinfo -p";
+ $ret = system($cmd);
+
+ if ($ret != 0) {
+ sleep(1);
+ }
+ $count++;
+ } while ($ret != 0 && $count < 20);
+ if ($count == 20) {
+ warn("winbind not reachable after 20 retries\n");
+ teardown_env($self, $testenv_vars);
+ return 0;
+ }
+
print $self->getlog_env($testenv_vars);
return $ret
--
2.11.0
More information about the samba-technical
mailing list