mirror of
https://github.com/samba-team/samba.git
synced 2025-03-09 08:58:35 +03:00
with the new banning logic with one struct for each node we no longer "forget" the other culprits as often as we used to do, which means that things like "ctdb recover" can now actually lead to a node becomming banned if we perform too many recoveries too frequently.
change this to provide absolution to all nodes once they have participated in a recovery session. (This used to be ctdb commit f66d17fb2e81a35d5adb3754e1cc902f76b4590a)
This commit is contained in:
parent
4b7f6c8a29
commit
a82b9cfbfd
@ -1409,6 +1409,27 @@ static int do_recovery(struct ctdb_recoverd *rec,
|
||||
|
||||
rec->need_recovery = false;
|
||||
|
||||
/* we managed to complete a full recovery, make sure to forgive
|
||||
any past sins by the nodes that could now participate in the
|
||||
recovery.
|
||||
*/
|
||||
DEBUG(DEBUG_ERR,("Resetting ban count to 0 for all nodes\n"));
|
||||
for (i=0;i<nodemap->num;i++) {
|
||||
struct ctdb_banning_state *ban_state;
|
||||
|
||||
if (nodemap->nodes[i].flags & NODE_FLAGS_DISCONNECTED) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ban_state = (struct ctdb_banning_state *)ctdb->nodes[nodemap->nodes[i].pnn]->ban_state;
|
||||
if (ban_state == NULL) {
|
||||
continue;
|
||||
}
|
||||
|
||||
ban_state->count = 0;
|
||||
}
|
||||
|
||||
|
||||
/* We just finished a recovery successfully.
|
||||
We now wait for rerecovery_timeout before we allow
|
||||
another recovery to take place.
|
||||
|
Loading…
x
Reference in New Issue
Block a user