[PATCH 6/8] urgent_replication: Use subunit reporting, remove allow_empty_output.

Stefan (metze) Metzmacher metze at samba.org
Sun Feb 1 04:39:43 MST 2015

Hi Jelmer,

>> This means LDAP:// might also be supposed to work, but
>> ldb_module_connect_backend() only handles 'ldap://'.
>> I'm also fine with removing only the "samdb_url = samdb_url.lower()" line
>> and drop support for 'LDAP://'.
> I think only handling ldap:// would be fine. I think it's actually
> most important that we're consistent in what we support across the
> Python and the C code.

I tend to agree.
I changed the patch to only remove the .lower().

> startswith() is a terrible way of parsing URLs ;) The 'urlparse'
> module (bundled with Python) in Python is probably better for parsing
> the URL and extracting the scheme.

Feel free to improve it:-)

Can you review the attached to patches?

-------------- next part --------------
From 5a0667808f3da6ab204ed16cf423bc78fd4890a2 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Mon, 26 Jan 2015 08:31:10 +0100
Subject: [PATCH 1/2] python/samba/tests: don't lower case path names in

We should not lower case file names, because we may get a path to sam.ldb.
Now we only lower case ldap urls.

For a long time I got failing private autobuild like this:

[1623(9233)/1718 at 1h28m9s] samba4.urgent_replication.python(dc)(dc:local)
Failed to connect to ldap URL
'ldap:///memdisk/metze/w/b12985/samba/bin/ab/dc/private/sam.ldb' - LDAP client
internal error: NT_STATUS_NO_MEMORY
Failed to connect to
'ldap:///memdisk/metze/w/b12985/samba/bin/ab/dc/private/sam.ldb' with backend
'ldap': (null)
REASON: _StringException: _StringException: Content-Type:

The problem is that /memdisk/metze/W/ is my test directory instead
of /memdisk/metze/w/.

Signed-off-by: Stefan Metzmacher <metze at samba.org>
 python/samba/tests/__init__.py | 1 -
 1 file changed, 1 deletion(-)

diff --git a/python/samba/tests/__init__.py b/python/samba/tests/__init__.py
index cca82bb..bda4adf 100644
--- a/python/samba/tests/__init__.py
+++ b/python/samba/tests/__init__.py
@@ -185,7 +185,6 @@ def connect_samdb(samdb_url, lp=None, session_info=None, credentials=None,
     to make proper URL for ldb.connect() while using default
     parameters for connection based on test environment
-    samdb_url = samdb_url.lower()
     if not "://" in samdb_url:
         if not ldap_only and os.path.isfile(samdb_url):
             samdb_url = "tdb://%s" % samdb_url

From 51a0e86661d727f09194f95807854edde34d2084 Mon Sep 17 00:00:00 2001
From: Stefan Metzmacher <metze at samba.org>
Date: Mon, 26 Jan 2015 11:53:12 +0100
Subject: [PATCH 2/2] selftest: fix check for RODC and RID Set allocation

Signed-off-by: Stefan Metzmacher <metze at samba.org>
 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 91db4f8..c85b4a7 100755
--- a/selftest/target/Samba4.pm
+++ b/selftest/target/Samba4.pm
@@ -182,7 +182,7 @@ sub wait_for_start($$)
 	system("$nmblookup $testenv_vars->{CONFIGURATION} -U $testenv_vars->{SERVER_IP} $testenv_vars->{NETBIOSNAME}");
 	# Ensure we have the first RID Set before we start tests.  This makes the tests more reliable.
-	if ($testenv_vars->{SERVER_ROLE} eq "domain controller" and not ($testenv_vars->{NETBIOS_NAME} eq "rodc")) {
+	if ($testenv_vars->{SERVER_ROLE} eq "domain controller" and not ($testenv_vars->{NETBIOSNAME} eq "RODC")) {
 	    # Add hosts file for name lookups
 	    $ENV{NSS_WRAPPER_HOSTS} = $testenv_vars->{NSS_WRAPPER_HOSTS};
 		if (defined($testenv_vars->{RESOLV_WRAPPER_CONF})) {

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20150201/172674fc/attachment.pgp>

More information about the samba-technical mailing list