The Samba-Bugzilla – Attachment 12162 Details for
Bug 11945
ctdb does not get out of banned state any more when failed internal interface comes back up
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch for v4-4-test, cherry-picked from master
bug-11945.v4-4-test.patch (text/plain), 2.77 KB, created by
Michael Adam
on 2016-06-06 15:23:49 UTC
(
hide
)
Description:
patch for v4-4-test, cherry-picked from master
Filename:
MIME Type:
Creator:
Michael Adam
Created:
2016-06-06 15:23:49 UTC
Size:
2.77 KB
patch
obsolete
>From bad2c8d23eb0a13282214d604d8b0172f4057afb Mon Sep 17 00:00:00 2001 >From: Amitay Isaacs <amitay@gmail.com> >Date: Wed, 1 Jun 2016 12:10:46 +1000 >Subject: [PATCH] ctdb-recoverd: Freeze databases whenever the node is INACTIVE > >If the node becomes stopped or banned after recovery is marked >active, then it will never freeze the databases, and hence the >node will keep banning itself indefinitely, until ctdbd is restarted. > >This is a regression from 4.3, introduced with > >b4357a79d916b1f8ade8fa78563fbef0ce670aa9 > >and > >d8f3b490bbb691c9916eed0df5b980c1aef23c85 > >BUG: https://bugzilla.samba.org/show_bug.cgi?id=11945 > >Signed-off-by: Amitay Isaacs <amitay@gmail.com> >Reviewed-by: Michael Adam <obnox@samba.org> >Reviewed-by: Martin Schwenke <martin@meltin.net> > >Autobuild-User(master): Michael Adam <obnox@samba.org> >Autobuild-Date(master): Wed Jun 1 17:36:12 CEST 2016 on sn-devel-144 > >(cherry picked from commit f8141e91a693912ea1107a49320e83702a80757a) >--- > ctdb/server/ctdb_recoverd.c | 15 +++++++++++++-- > 1 file changed, 13 insertions(+), 2 deletions(-) > >diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c >index c89649a..0675f59 100644 >--- a/ctdb/server/ctdb_recoverd.c >+++ b/ctdb/server/ctdb_recoverd.c >@@ -252,6 +252,7 @@ struct ctdb_recoverd { > struct ctdb_iface_list_old *ifaces; > uint32_t *force_rebalance_nodes; > struct ctdb_node_capabilities *caps; >+ bool frozen_on_inactive; > }; > > #define CONTROL_TIMEOUT() timeval_current_ofs(ctdb->tunable.recover_timeout, 0) >@@ -3489,11 +3490,18 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec, > > return; > } >- ret = ctdb_ctrl_freeze(ctdb, CONTROL_TIMEOUT(), CTDB_CURRENT_NODE); >+ } >+ if (! rec->frozen_on_inactive) { >+ ret = ctdb_ctrl_freeze(ctdb, CONTROL_TIMEOUT(), >+ CTDB_CURRENT_NODE); > if (ret != 0) { >- DEBUG(DEBUG_ERR,(__location__ " Failed to freeze node in STOPPED or BANNED state\n")); >+ DEBUG(DEBUG_ERR, >+ (__location__ " Failed to freeze node " >+ "in STOPPED or BANNED state\n")); > return; > } >+ >+ rec->frozen_on_inactive = true; > } > > /* If this node is stopped or banned then it is not the recovery >@@ -3503,6 +3511,8 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec, > return; > } > >+ rec->frozen_on_inactive = false; >+ > /* If we are not the recmaster then do some housekeeping */ > if (rec->recmaster != pnn) { > /* Ignore any IP reallocate requests - only recmaster >@@ -3882,6 +3892,7 @@ static void monitor_cluster(struct ctdb_context *ctdb) > CTDB_NO_MEMORY_FATAL(ctdb, rec->recovery); > > rec->priority_time = timeval_current(); >+ rec->frozen_on_inactive = false; > > /* register a message port for sending memory dumps */ > ctdb_client_set_message_handler(ctdb, CTDB_SRVID_MEM_DUMP, mem_dump_handler, rec); >-- >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:
obnox
:
review+
gd
:
review+
obnox
:
review?
(
amitay
)
jarrpa
:
review+
martins
:
review+
Actions:
View
Attachments on
bug 11945
:
12157
| 12162