1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

banning: Do not come out of ban if databases are not frozen

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit a60f228f8380f222f838eb619d2ab55f96f11ac2)
This commit is contained in:
Amitay Isaacs 2013-07-01 17:40:36 +10:00
parent 9a944d71dc
commit 5deebd3b75

View File

@ -31,6 +31,21 @@ ctdb_ban_node_event(struct event_context *ev, struct timed_event *te,
struct timeval t, void *private_data)
{
struct ctdb_context *ctdb = talloc_get_type(private_data, struct ctdb_context);
bool freeze_failed = false;
int i;
/* Make sure we were able to freeze databases during banning */
for (i=1; i<=NUM_DB_PRIORITIES; i++) {
if (ctdb->freeze_mode[i] != CTDB_FREEZE_FROZEN) {
freeze_failed = true;
break;
}
}
if (freeze_failed) {
DEBUG(DEBUG_ERR, ("Banning timedout, but still unable to freeze databases\n"));
ctdb_ban_self(ctdb);
return;
}
DEBUG(DEBUG_ERR,("Banning timedout\n"));
ctdb->nodes[ctdb->pnn]->flags &= ~NODE_FLAGS_BANNED;