mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
ctdb-recoverd: Unify takeover run triggering code in main loop
Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> Autobuild-User(master): Amitay Isaacs <amitay@samba.org> Autobuild-Date(master): Fri May 13 17:15:57 CEST 2016 on sn-devel-144
This commit is contained in:
parent
e3e4f37c41
commit
f9d4cb4c29
@ -3871,21 +3871,12 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
|
||||
|
||||
takeover_run_checks:
|
||||
|
||||
/* if there are takeovers requested, perform it and notify the waiters */
|
||||
/* If there are IP takeover runs requested or the previous one
|
||||
* failed then perform one and notify the waiters */
|
||||
if (!ctdb_op_is_disabled(rec->takeover_run) &&
|
||||
rec->reallocate_requests) {
|
||||
(rec->reallocate_requests || rec->need_takeover_run)) {
|
||||
process_ipreallocate_requests(ctdb, rec);
|
||||
}
|
||||
|
||||
/* we might need to change who has what IP assigned */
|
||||
if (rec->need_takeover_run) {
|
||||
/* If takeover run fails, then the offending nodes are
|
||||
* assigned ban culprit counts. And we re-try takeover.
|
||||
* If takeover run fails repeatedly, the node would get
|
||||
* banned.
|
||||
*/
|
||||
do_takeover_run(rec, nodemap);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user