[PATCH] Merged provision and provision-backend

Andrew Bartlett abartlet at samba.org
Sun Aug 16 17:56:36 MDT 2009


On Fri, 2009-08-14 at 16:21 +0200, Oliver Liebel wrote:
> Andrew Bartlett schrieb:
> > On Thu, 2009-08-13 at 17:39 +1000, Andrew Bartlett wrote:
> >   
> >> On Thu, 2009-08-13 at 17:07 +1000, Andrew Bartlett wrote:
> >>     
> >>> Attached is a great slab of work, aimed at merging the provision and
> >>> provision-backend scripts.  I've taken quite a comprehensive approach to
> >>> the problem, and have also looked into some of the performance issues in
> >>> the 'normal' provision. 
> >>>
> >>> Attached is the patch series. 
> >>>
> >>> Let me know how it goes, as I can't actually get OpenLDAP to start.
> >>> I've CC'ed Howard for some assistance on that point :-)
> >>>       
> >> Rather than waste more bandwidth with another patch set, I've pushed a
> >> rebased set (on top of current master) to 
> >>
> >> git://git.samba.org/abartlet/samba.org openldap-backend
> >>     
> >
> > After a long night of fixes (I've updated the branch again), I've almost
> > got everything working in this branch, at least as far as I can tell
> > with my busted OpenLDAP setup.
> >
> > Can you give this a test, and let me know?
> >
> > Thanks,
> >
> >   
> tested on oss 11.1 64bit:
> 
> 1.) "normal" provision:
> we ran into this error, but it seems to be more "cosmetic":
> 
> #> setup/provision --realm=ldap.local.site --domain=LDAP 
> --adminpass=linux --server-role="domain controller" 
> --slapd-path="/usr/local/libexec/slapd" --ldap-backend-type=openldap 
> --ldap-backend-extra-port=9000
> 
> -----------
> ...
> hdb_db_open: database 
> "cn=Schema,cn=Configuration,dc=ldap,dc=local,dc=site": 
> db_open(/usr/local/s4-ol/private/ldap/db/schema/id2entry.bdb) failed: No 
> such file or directory (2).
> backend_startup_one: bi_db_open failed! (2)
> slap_startup failed (test would succeed using the -u switch)
> Failed to bind - LDAP client internal error: 
> NT_STATUS_UNEXPECTED_NETWORK_ERROR
> Failed to connect to 
> 'ldapi://%2Fusr%2Flocal%2Fs4-ol%2Fprivate%2Fldap%2Fldapi'

Yeah, I'll need to work to prevent the lower layers here from emiting
the expected error messages.  This might take time. 

> Setting up share.ldb
> Setting up secrets.ldb
> ...
> <rest ok>
> ...
> -------------
> 
> post-provision: start slapd,  fire up s4: everythings ok,
> and the good news:
> no crash any more when connecting with ldap-client (ldbsearch, 
> ldapsearch, apache DS)
> 
> theres a small error, when detecting if another instance of slapd is 
> already listening on our
> ldapi_uri:
> 
> ------------
> ...
> Check for slapd Process with PID: 1888
>  and terminate it manually.
> Traceback (most recent call last):
>   File "setup/provision", line 198, in <module>
>     ldap_dryrun_mode=opts.ldap_dryrun_mode)
>   File "bin/python/samba/provision.py", line 1076, in provision
>     ldap_dryrun_mode=ldap_dryrun_mode)
>   File "bin/python/samba/provision.py", line 1317, in __init__
>     raise("Warning: Another slapd Instance seems already running on this 
> host, listening to " + ldapi_uri + ". Please shut it down before you 
> continue. ")
> NameError: global name 'ldapi_uri' is not defined
> ...
> --------------

Fixed. 

> 
> Changing the line (1317):
> 
> raise ("Warning: Another slapd Instance seems already running on this 
> host, listening to " + ldapi_uri + ". Please shut it down before you 
> continue. ")
> 
> to:
> 
>  raise(self.ldapi_uri)
> 
> gave me this error:
> 
> TypeError: exceptions must be classes or instances, not str

Yeah, I need to look into the correct way to raise exceptions.  I think
I need to have a particular exception object I return. 

> 2.) "make gdbtest" (run in xterm, no crash) also seems to be ok:
> 
> ( used:  "#> OPENLDAP_SLAPD=/usr/local/libexec/slapd TEST_LDAP=yes make 
> gdbtest > /install/openldap-backend/gdb-trace.txt 2>&1",
> file is attached)

You have an odd definition of 'works' given that the daemon exited, and
the only test that ran failed...

> UNEXPECTED(failure): samba4.ldb.ldap with options  (dc).Listing Groups
> Failed to connect to ldap URL 'ldap://127.0.0.1' - LDAP client internal error: NT_STATUS_HOST_UNREACHABLE
> Failed to connect to 'ldap://127.0.0.1'
> Failed to connect to ldap://127.0.0.1 - (null)

Andrew Bartlett

-- 
Andrew Bartlett
http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Cisco Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20090817/c580ba38/attachment.pgp>


More information about the samba-technical mailing list