samba-tool: use a timeout of 5 minutes in 'samba-tool drs replicate'
authorStefan Metzmacher <metze@samba.org>
Thu, 28 Jul 2016 05:48:44 +0000 (07:48 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 28 Jul 2016 08:06:10 +0000 (10:06 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Garming Sam <garming@samba.org>
python/samba/netcmd/drs.py

index 40981314d9ccab6b2c5c2191afee4ebe485580ab..1a556efa68b92bbba95479348da6248f9b90f243 100644 (file)
@@ -34,7 +34,6 @@ from samba import drs_utils, nttime2string, dsdb
 from samba.dcerpc import drsuapi, misc
 import common
 from samba.join import join_clone
-from samba.messaging import IRPC_CALL_TIMEOUT_INF
 
 def drsuapi_connect(ctx):
     '''make a DRSUAPI connection to the server'''
@@ -318,14 +317,16 @@ class cmd_drs_replicate(Command):
             return
 
         if local_online:
-            server_bind = drsuapi.drsuapi("irpc:dreplsrv", lp_ctx=self.lp,
-                                          timeout=IRPC_CALL_TIMEOUT_INF)
+            server_bind = drsuapi.drsuapi("irpc:dreplsrv", lp_ctx=self.lp)
             server_bind_handle = misc.policy_handle()
         else:
             drsuapi_connect(self)
             server_bind = self.drsuapi
             server_bind_handle = self.drsuapi_handle
 
+        # Give the sync replication 5 minutes time
+        server_bind.request_timeout = 5 * 60
+
         samdb_connect(self)
 
         # we need to find the NTDS GUID of the source DC