The Samba-Bugzilla – Attachment 12172 Details for
Bug 11956
CTDB runs recoverd event twice after recovery
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for v4-4 branch
0001-ctdb-recoverd-Avoid-duplicate-recoverd-event-in-para.patch (text/plain), 2.37 KB, created by
Amitay Isaacs
on 2016-06-09 04:16:02 UTC
(
hide
)
Description:
Patch for v4-4 branch
Filename:
MIME Type:
Creator:
Amitay Isaacs
Created:
2016-06-09 04:16:02 UTC
Size:
2.37 KB
patch
obsolete
>From 938eac7661b5d86e72391129ed5ddfbb632ab433 Mon Sep 17 00:00:00 2001 >From: Amitay Isaacs <amitay@gmail.com> >Date: Wed, 8 Jun 2016 14:15:22 +1000 >Subject: [PATCH] ctdb-recoverd: Avoid duplicate recoverd event in parallel > recovery > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=11956 > >In do_recovery, after the recovery and takeover is complete, recoverd >event is triggered. When the parallel database recovery was separated, >ctdb_recovery_helper implemented sending END_RECOVERY control which >causes recoverd event to be triggered. So when there is parallel database >recovery, recoverd event is triggered twice. > >Instead move the call to run_recovered_eventscript() explicitly in >the serial recovery code path. This avoids the duplication trigger of >recoverd event. > >Signed-off-by: Amitay Isaacs <amitay@gmail.com> >Reviewed-by: Martin Schwenke <martin@meltin.net> >(cherry picked from commit ecb74721e78942e66aaf2d2f88f141305e311328) >--- > ctdb/server/ctdb_recoverd.c | 18 +++++++++--------- > 1 file changed, 9 insertions(+), 9 deletions(-) > >diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c >index c0a06b6..f05741b 100644 >--- a/ctdb/server/ctdb_recoverd.c >+++ b/ctdb/server/ctdb_recoverd.c >@@ -1983,6 +1983,15 @@ static int db_recovery_serial(struct ctdb_recoverd *rec, TALLOC_CTX *mem_ctx, > > DEBUG(DEBUG_NOTICE, (__location__ " Recovery - disabled recovery mode\n")); > >+ /* execute the "recovered" event script on all nodes */ >+ ret = run_recovered_eventscript(rec, nodemap, "do_recovery"); >+ if (ret!=0) { >+ DEBUG(DEBUG_ERR, (__location__ " Unable to run the 'recovered' event on cluster. Recovery process failed.\n")); >+ return -1; >+ } >+ >+ DEBUG(DEBUG_NOTICE, (__location__ " Recovery - finished the recovered event\n")); >+ > return 0; > } > >@@ -2158,15 +2167,6 @@ static int do_recovery(struct ctdb_recoverd *rec, > > do_takeover_run(rec, nodemap, false); > >- /* execute the "recovered" event script on all nodes */ >- ret = run_recovered_eventscript(rec, nodemap, "do_recovery"); >- if (ret!=0) { >- DEBUG(DEBUG_ERR, (__location__ " Unable to run the 'recovered' event on cluster. Recovery process failed.\n")); >- goto fail; >- } >- >- DEBUG(DEBUG_NOTICE, (__location__ " Recovery - finished the recovered event\n")); >- > /* send a message to all clients telling them that the cluster > has been reconfigured */ > ret = ctdb_client_send_message(ctdb, CTDB_BROADCAST_CONNECTED, >-- >2.5.5 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
martins
:
review+
Actions:
View
Attachments on
bug 11956
: 12172