On Thu, 20 Jan 2011 11:03:12 +0530
Aravind GV <aravind...@gmail.com> wrote:

> Hi Simo,
> 
> Great repossess from you but still issue is not solved completely.
> After applying your patch iam getting below mention error
> 
> 
> [root@dirsrv ~]# ipa-replica-manage connect  --winsync --binddn
> CN=agv,OU=Users,DC=bgkerb,DC=test02,DC=com  --cacert /root/bgkerb.cer
> 10.0.65.28 --passsync asd312ASD --bindpw asd312ASD -v
> Added CA certificate /root/bgkerb.cer to certificate database for
> dirsrv.agv.com
> *unexpected error: basic_replication_setup() takes exactly 5
> arguments (3 given)*


I am sorry Aravind,
but at the moment I do not have a test environment that lets me test
winsync replication.

Hopefully this new patch should fix the remaining regressions.

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York
>From 5c9952b5e166dde222bc8c5433ca97480432a980 Mon Sep 17 00:00:00 2001
From: Simo Sorce <sso...@redhat.com>
Date: Wed, 19 Jan 2011 09:53:59 -0500
Subject: [PATCH] Fix ipa-replica-manage regressions with winsync

Avoids ipa-replica-manage to throw up errors.

Fixes: https://fedorahosted.org/freeipa/ticket/807
---
 install/tools/ipa-replica-manage |    7 ++++++-
 ipaserver/install/dsinstance.py  |    1 +
 ipaserver/install/replication.py |    8 +++++---
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/install/tools/ipa-replica-manage b/install/tools/ipa-replica-manage
index 80974545761399cec46032c8ae2b6689aa4ff7fd..20eb93c26748c71e097a38f40cb58c0215a643e1 100755
--- a/install/tools/ipa-replica-manage
+++ b/install/tools/ipa-replica-manage
@@ -26,7 +26,7 @@ from ipapython import ipautil
 from ipaserver.install import replication, dsinstance, installutils
 from ipaserver import ipaldap
 from ipapython import version
-from ipalib import errors, util
+from ipalib import api, errors, util
 
 CACERT = "/etc/ipa/ca.crt"
 
@@ -355,6 +355,11 @@ def force_sync(realm, thishost, fromhost, dirman_passwd):
 def main():
     options, args = parse_options()
 
+    # Just initialize the environment. This is so the installer can have
+    # access to the plugin environment
+    api.bootstrap(in_server=True)
+    api.finalize()
+
     dirman_passwd = None
     realm = krbV.default_context().default_realm
 
diff --git a/ipaserver/install/dsinstance.py b/ipaserver/install/dsinstance.py
index 378e0123405ed1222129d899573974fba9089a55..5da9d17d4417031920495254ff566ee235234bfb 100644
--- a/ipaserver/install/dsinstance.py
+++ b/ipaserver/install/dsinstance.py
@@ -180,6 +180,7 @@ class DsInstance(service.Service):
         self.dercert = None
         self.idstart = None
         self.idmax = None
+        self.subject_base = None
         if realm_name:
             self.suffix = util.realm_to_suffix(self.realm_name)
             self.__setup_sub_dict()
diff --git a/ipaserver/install/replication.py b/ipaserver/install/replication.py
index 21e6bcc4970f5d534df882f98327ace9119db983..756bb5595226d49e31edf5ce5afd12d26ac26758 100644
--- a/ipaserver/install/replication.py
+++ b/ipaserver/install/replication.py
@@ -625,7 +625,8 @@ class ReplicationManager:
         # there is no other side to get a replica ID from
         # So we generate one locally
         replica_id = self._get_replica_id(self.conn, self.conn)
-        self.basic_replication_setup(self.conn, replica_id)
+        self.basic_replication_setup(self.conn, replica_id,
+                                     self.repl_man_dn, self.repl_man_passwd)
 
         #now add a passync user allowed to access the AD server
         self.add_passsync_user(self.conn, passsync_pw)
@@ -638,8 +639,9 @@ class ReplicationManager:
         logging.info("Agreement is ready, starting replication . . .")
 
         #Finally start replication
-        return self.start_replication(self.conn, ad_conn,
-                                      self.repl_man_dn, self.repl_man_passwd)
+        ret = self.start_replication(ad_conn)
+        if ret != 0:
+            raise RuntimeError("Failed to start replication")
 
     def convert_to_gssapi_replication(self, r_hostname, r_binddn, r_bindpw):
         r_conn = ipaldap.IPAdmin(r_hostname, port=PORT, cacert=CACERT)
-- 
1.7.3.4

_______________________________________________
Freeipa-users mailing list
Freeipa-users@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-users

Reply via email to