Update OpenLDAP MMR configuration per comments by Oliver Liebel
authorAndrew Bartlett <abartlet@samba.org>
Wed, 20 Aug 2008 02:21:36 +0000 (12:21 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 20 Aug 2008 02:21:36 +0000 (12:21 +1000)
<oliver@itc.li>

This changes the RIDs to be <serverID><DBID>, to ease later debugging.

The need to specify the port on the MMR URLs is now included in the
help.

Andrew Bartlett
(This used to be commit a5cbe8c09c6f14f95ff9ba9b8782e2100fc55695)

source4/scripting/python/samba/provision.py
source4/setup/provision-backend

index 0855efe3bbf572055c7f0222681506bf6272efcc..d14ce58f045a56e8278b5bc9f715b7e2f80c7a88 100644 (file)
@@ -1281,39 +1281,38 @@ def provision_backend(setup_dir=None, message=None,
        mmr_syncrepl_user_config = "" 
        
        if ol_mmr_urls is not None:
        mmr_syncrepl_user_config = "" 
        
        if ol_mmr_urls is not None:
-               mmr_hosts=filter(None,ol_mmr_urls.split(' ')) 
-                if (len(mmr_hosts) == 1):
-                    mmr_hosts=filter(None,ol_mmr_urls.split(',')) 
+               url_list=filter(None,ol_mmr_urls.split(' ')) 
+                if (len(url_list) == 1):
+                    url_list=filter(None,ol_mmr_urls.split(',')) 
                      
 
                mmr_on_config = "MirrorMode On"
                      
 
                mmr_on_config = "MirrorMode On"
-               
-               z=0
-               for i in mmr_hosts:
-                       z=z+1
+               serverid=0
+               for url in url_list:
+                       serverid=serverid+1
                        mmr_serverids_config += read_and_sub_file(setup_path("mmr_serverids.conf"),
                        mmr_serverids_config += read_and_sub_file(setup_path("mmr_serverids.conf"),
-                                                                    { "SERVERID" : str(z),
-                                                                      "LDAPSERVER" : i })
-
-                       z=z+1
+                                                                    { "SERVERID" : str(serverid),
+                                                                      "LDAPSERVER" : url })
+                        rid=serverid*10
+                       rid=rid+1
                        mmr_syncrepl_schema_config += read_and_sub_file(setup_path("mmr_syncrepl.conf"),
                        mmr_syncrepl_schema_config += read_and_sub_file(setup_path("mmr_syncrepl.conf"),
-                                                                    {  "RID" : str(z),
+                                                                    {  "RID" : str(rid),
                                                                        "MMRDN": names.schemadn,
                                                                        "MMRDN": names.schemadn,
-                                                                       "LDAPSERVER" : i,
+                                                                       "LDAPSERVER" : url,
                                                                         "MMR_PASSWORD": adminpass})
 
                                                                         "MMR_PASSWORD": adminpass})
 
-                       z=z+1
+                       rid=rid+1
                        mmr_syncrepl_config_config += read_and_sub_file(setup_path("mmr_syncrepl.conf"),
                        mmr_syncrepl_config_config += read_and_sub_file(setup_path("mmr_syncrepl.conf"),
-                                                                    {  "RID" : str(z),
+                                                                    {  "RID" : str(rid),
                                                                        "MMRDN": names.configdn,
                                                                        "MMRDN": names.configdn,
-                                                                       "LDAPSERVER" : i,
+                                                                       "LDAPSERVER" : url,
                                                                         "MMR_PASSWORD": adminpass})
 
                                                                         "MMR_PASSWORD": adminpass})
 
-                       z=z+1
+                       rid=rid+1
                        mmr_syncrepl_user_config += read_and_sub_file(setup_path("mmr_syncrepl.conf"),
                        mmr_syncrepl_user_config += read_and_sub_file(setup_path("mmr_syncrepl.conf"),
-                                                                    {  "RID" : str(z),
+                                                                    {  "RID" : str(rid),
                                                                        "MMRDN": names.domaindn,
                                                                        "MMRDN": names.domaindn,
-                                                                       "LDAPSERVER" : i,
+                                                                       "LDAPSERVER" : url,
                                                                         "MMR_PASSWORD": adminpass })
 
 
                                                                         "MMR_PASSWORD": adminpass })
 
 
index 049b8752a6fefebb82f000c9313bd1d3d437747a..0943da29b616bd2cfc3b0271c635cabff67e67d2 100755 (executable)
@@ -65,7 +65,7 @@ parser.add_option("--server-role", type="choice", metavar="ROLE",
 parser.add_option("--targetdir", type="string", metavar="DIR", 
                          help="Set target directory")
 parser.add_option("--ol-mmr-urls", type="string", metavar="LDAPSERVER",
 parser.add_option("--targetdir", type="string", metavar="DIR", 
                          help="Set target directory")
 parser.add_option("--ol-mmr-urls", type="string", metavar="LDAPSERVER",
-                help="List of LDAP-URLS separated with whitespaces for Use with OpenLDAP-MMR")
+                help="List of LDAP-URLS [ ldap://<FQDN>:port/  (where port != 389) ] separated with whitespaces for use with OpenLDAP-MMR")
 
 
 opts = parser.parse_args()[0]
 
 
 opts = parser.parse_args()[0]