From 05c2d86d0757653b777d0518f96beabc91bc7993 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Fri, 21 Feb 2020 11:13:05 +1100 Subject: [PATCH] ctdb-recovery: Use CTDB_CTRL_FLAG_ATTACH_RECOVERY to attach during recovery ctdb_ctrl_createdb() is only called by the recovery daemon, so this is a safe, temporary change. This is temporary because ctdb_ctrl_createdb(), create_missing_remote_databases() and create_missing_local_databases() will all go away soon. Note that this doesn't cause a change in behaviour. The main daemon will still only defer attaches from non-recoverd processes during recovery. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14294 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs (cherry picked from commit 98e3d0db2bc5f33217e26fab1dfb4bb91eae534f) --- ctdb/server/ctdb_client.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/ctdb/server/ctdb_client.c b/ctdb/server/ctdb_client.c index f5366e874ee..5d62e3c2c1b 100644 --- a/ctdb/server/ctdb_client.c +++ b/ctdb/server/ctdb_client.c @@ -1160,8 +1160,17 @@ int ctdb_ctrl_createdb(struct ctdb_context *ctdb, struct timeval timeout, opcode = CTDB_CONTROL_DB_ATTACH; } - ret = ctdb_control(ctdb, destnode, 0, opcode, 0, data, - mem_ctx, &data, &res, &timeout, NULL); + ret = ctdb_control(ctdb, + destnode, + 0, + opcode, + CTDB_CTRL_FLAG_ATTACH_RECOVERY, + data, + mem_ctx, + &data, + &res, + &timeout, + NULL); if (ret != 0 || res != 0) { return -1; -- 2.47.3