1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

ctdb-banning: Do not set recovery mode to ACTIVE in daemon

When a node gets banned, it should go into recovery and freeze all
databases.  We rely on the recovery daemon to detect the banned state
and put the node in recovery and freeze all databases.

Recent change in b4357a79d9 took explicit
freezing out of banning code but left the setting of recovery mode
to ACTIVE.  Recovery daemon will freeze databases only if the recovery
mode is NORMAL.  Recovery mode set to ACTIVE is an indication that the
freeze has started.

Do not set the recovery mode to ACTIVE in banning.  Let recovery daemon
take care of it.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>

Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Fri Oct 30 10:32:38 CET 2015 on sn-devel-104
This commit is contained in:
Amitay Isaacs 2015-10-30 14:25:50 +11:00 committed by Martin Schwenke
parent 30a6a2247b
commit d8f3b490bb

View File

@ -72,8 +72,9 @@ void ctdb_local_node_got_banned(struct ctdb_context *ctdb)
ctdb_db->generation = INVALID_GENERATION;
}
/* make sure we get frozen */
ctdb->recovery_mode = CTDB_RECOVERY_ACTIVE;
/* Recovery daemon will set the recovery mode ACTIVE and freeze
* databases.
*/
ctdb_release_all_ips(ctdb);
}