summaryrefslogtreecommitdiff
path: root/source4/dsdb/repl/drepl_notify.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2010-11-17 23:13:32 +1100
committerAndrew Tridgell <tridge@samba.org>2010-11-17 23:55:39 +1100
commit6c8b0d7f2784faf68d08d42227765bdc0ce28b35 (patch)
tree3668a2afb8d1c651022ec98343c8d52f0269b4df /source4/dsdb/repl/drepl_notify.c
parent73016ad40523d4d41114c7b4d6bb2a46815bb597 (diff)
downloadsamba-6c8b0d7f2784faf68d08d42227765bdc0ce28b35.tar.gz
samba-6c8b0d7f2784faf68d08d42227765bdc0ce28b35.tar.bz2
samba-6c8b0d7f2784faf68d08d42227765bdc0ce28b35.zip
s4-repl: save the result of the last replication in repsFrom/repsTo
when a replication fails, we should add the failure to repsFrom when a notify fails, we need to save it to repsTo this ensures showrepl always shows the latest status
Diffstat (limited to 'source4/dsdb/repl/drepl_notify.c')
-rw-r--r--source4/dsdb/repl/drepl_notify.c31
1 files changed, 7 insertions, 24 deletions
diff --git a/source4/dsdb/repl/drepl_notify.c b/source4/dsdb/repl/drepl_notify.c
index 25378129da..4629357711 100644
--- a/source4/dsdb/repl/drepl_notify.c
+++ b/source4/dsdb/repl/drepl_notify.c
@@ -120,10 +120,6 @@ static void dreplsrv_op_notify_replica_sync_trigger(struct tevent_req *req)
DRSUAPI_DRS_ASYNC_OP |
DRSUAPI_DRS_UPDATE_NOTIFICATION |
DRSUAPI_DRS_WRIT_REP;
- if (state->op->service->syncall_workaround) {
- DEBUG(3,("sending DsReplicaSync with SYNC_ALL workaround\n"));
- r->in.req->req1.options |= DRSUAPI_DRS_SYNC_ALL;
- }
if (state->op->is_urgent) {
r->in.req->req1.options |= DRSUAPI_DRS_SYNC_URGENT;
@@ -189,30 +185,13 @@ static void dreplsrv_notify_op_callback(struct tevent_req *subreq)
struct dreplsrv_notify_operation);
NTSTATUS status;
struct dreplsrv_service *s = op->service;
+ WERROR werr;
status = dreplsrv_op_notify_recv(subreq);
+ werr = ntstatus_to_werror(status);
TALLOC_FREE(subreq);
if (!NT_STATUS_IS_OK(status)) {
- WERROR werr;
- unsigned int msg_debug_level = 0;
- werr = ntstatus_to_werror(status);
- if (W_ERROR_EQUAL(werr, WERR_BADFILE)) {
- /*
- * TODO:
- *
- * we should better fix the bug regarding
- * non-linked attribute handling, instead
- * of just hiding the failures.
- *
- * we should also remove the dc from our repsTo
- * if it failed to often, instead of retrying
- * every few seconds
- */
- msg_debug_level = 2;
- }
-
- DEBUG(msg_debug_level,
- ("dreplsrv_notify: Failed to send DsReplicaSync to %s for %s - %s : %s\n",
+ DEBUG(4,("dreplsrv_notify: Failed to send DsReplicaSync to %s for %s - %s : %s\n",
op->source_dsa->repsFrom1->other_info->dns_name,
ldb_dn_get_linearized(op->source_dsa->partition->dn),
nt_errstr(status), win_errstr(werr)));
@@ -226,6 +205,10 @@ static void dreplsrv_notify_op_callback(struct tevent_req *subreq)
op->source_dsa->notify_uSN = op->uSN;
}
+ drepl_reps_update(s, "repsTo", op->source_dsa->partition->dn,
+ &op->source_dsa->repsFrom1->source_dsa_obj_guid,
+ werr);
+
talloc_free(op);
s->ops.n_current = NULL;
dreplsrv_run_pending_ops(s);