samba4-ol-mmr

Andrew Bartlett abartlet at samba.org
Tue Aug 12 12:04:56 GMT 2008


On Tue, 2008-08-12 at 13:40 +0200, Oliver Liebel wrote:
> 
> Andrew Bartlett schrieb:
> > When constructing a diff, run diff -u oldfile newfile.  This gives me a
> > much easier to read diff.
> >   
> okay - see attached new diffs.
> > Given the option names you have chosen, try 'ol_mmr' 
> what do you think about checking only the presence of ol_mmr_url1 (maybe 
> logical "and-ed" url2).
> if values not "none", then all mmr-specific values will be set. so we 
> dont need [ol_mmr =yes] as choice.

Yep.  I was thinking we could actually have it as
--ol-mmr-urls="ldap://host1 ldap://host2", and use pythons .split()
function to get a list of them from the string. 

ie, 

ol_mmr_urls = opts.ol_mmr_urls.split

You could then work on the URL list, which might include any number of
servers.  But perhaps leave this for later...

> > and 'ol_mmr_url1'
> > etc.  The name in opts is the name for the long option (eg
> > --ol-mmr-url1) with the - replaced by -.
> >   
> ....hm, not really. i replaced the values, now i got another error.
> "Traceback (most recent call last):
>   File "setup/provision-backend", line 109, in <module>
>     ol_mmr_url2=opts.ol_mmr_url2)
> TypeError: provision_backend() got an unexpected keyword argument 
> 'ol_mmr_url1'"

I think you might need to 'make installpython' after changing the
provision.py script.  

> @@ -1141,7 +1152,8 @@
>                        smbconf=None, targetdir=None, realm=None, 
>                        rootdn=None, domaindn=None, schemadn=None,
> configdn=None,
>                        domain=None, hostname=None, adminpass=None,
> root=None, serverrole=None, 
> -                      ldap_backend_type=None,
> ldap_backend_port=None):
> +                      ldap_backend_type=None, ldap_backend_port=None,
> +		      ol_mmr_url1=None, ol_mmr_url2=None, ):

Remove the last , 

>      def setup_path(file):
>          return os.path.join(setup_dir, file)
> @@ -1256,6 +1268,16 @@
>          refint_config = read_and_sub_file(setup_path("refint.conf"),
>                                              { "LINK_ATTRS" :
> refint_attributes})
>      
> +	if ol_mmr_url1 is not None:
> +	        ol-mmr_config = read_and_sub_file(setup_path("ol-mmr.conf"),
> +                                           { "LDAPSERVER_1" :
> ol_mmr_url1},
> +                                           { "LDAPSERVER_2" :
> ol_mmr_url2})
> +
> +	if ol_mmr_url1 is not None:
> +	        ol-mmr_config =

make this ol_mmr_schema

>  read_and_sub_file(setup_path("ol-mmr-schema.conf"),

You need to specify the variables to sub.  Only create one ol-mmr.conf,
and then specify different MMR_DN values (instead of CONFIG_DN) for the
3 different mmr configs.

> +	        ol-mmr_config =
> read_and_sub_file(setup_path("ol-mmr-config.conf"),

change ol-mmr_config to ol_mmr_config

> +	        ol-mmr_config =
> read_and_sub_file(setup_path("ol-mmr-user.conf")

likewise, change ol-mmr_config to ol_mmr_user

> +
>          setup_file(setup_path("slapd.conf"), paths.slapdconf,
>                     {"DNSDOMAIN": names.dnsdomain,
>                      "LDAPDIR": paths.ldapdir,

Then add a new sub of "OL_MMR_USER": ol_mmr_user 
(etc)

You seem to be getting the idea.  Keep up the good work!

Andrew Bartlett

-- 
Andrew Bartlett
http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org
Samba Developer, Red Hat Inc.                  http://redhat.com

-------------- 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/archive/samba-technical/attachments/20080812/89bd6e79/attachment.bin


More information about the samba-technical mailing list