mirror of
https://github.com/samba-team/samba.git
synced 2025-03-20 22:50:26 +03:00
we must repoint dmaster to an invalid node during recovery to stop the
shortcut from working (This used to be ctdb commit 5e18930be8c0efb87aa9e2780d9457634b24e156)
This commit is contained in:
parent
e11eebd070
commit
5efa3d88c5
@ -378,21 +378,21 @@ static int do_recovery(struct ctdb_context *ctdb, struct event_context *ev,
|
||||
|
||||
|
||||
|
||||
/* pull all remote databases onto the local node */
|
||||
ret = pull_all_remote_databases(ctdb, nodemap, vnn, dbmap, mem_ctx);
|
||||
/* repoint all local and remote database records to an invalid
|
||||
node as being dmaster to stop the shortcut from working
|
||||
*/
|
||||
ret = update_dmaster_on_all_databases(ctdb, nodemap, vnn, dbmap, mem_ctx);
|
||||
if (ret != 0) {
|
||||
DEBUG(0, (__location__ "Unable to pull remote databases\n"));
|
||||
DEBUG(0, (__location__ "Unable to update dmaster on all databases\n"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* repoint all local and remote database records to the local
|
||||
node as being dmaster
|
||||
*/
|
||||
ret = update_dmaster_on_all_databases(ctdb, nodemap, vnn, dbmap, mem_ctx);
|
||||
/* pull all remote databases onto the local node */
|
||||
ret = pull_all_remote_databases(ctdb, nodemap, vnn, dbmap, mem_ctx);
|
||||
if (ret != 0) {
|
||||
DEBUG(0, (__location__ "Unable to update dmaster on all databases\n"));
|
||||
DEBUG(0, (__location__ "Unable to pull remote databases\n"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -439,6 +439,17 @@ static int do_recovery(struct ctdb_context *ctdb, struct event_context *ev,
|
||||
}
|
||||
|
||||
|
||||
/* repoint all local and remote database records to the local
|
||||
node as being dmaster
|
||||
*/
|
||||
ret = update_dmaster_on_all_databases(ctdb, nodemap, vnn, dbmap, mem_ctx);
|
||||
if (ret != 0) {
|
||||
DEBUG(0, (__location__ "Unable to update dmaster on all databases\n"));
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* disable recovery mode */
|
||||
ret = set_recovery_mode(ctdb, nodemap, CTDB_RECOVERY_NORMAL);
|
||||
if (ret!=0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user