Commit
3cc230b5eeca749ab68d19cfda969f72c269f1f6 says:
Dont allow clients to connect to databases untile we are well past
and through the initial recovery phase
It is unclear what this commit was attempting to do. The commit
message implies that more attaches should be deferred but the code
change adds a conjunction that causes less attaches to be deferred.
In particular, no attaches will be deferred after startup is complete.
This seems wrong.
To implement what seems to be stated in the commit message an "or"
needs to be used so that non-recovery daemon attaches are deferred
either when in recovery or before startup is complete. Making this
change highlights that attaches need to be allowed during the
"startup" event because this is when smbd is started.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14294
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit
c6c89495fbe9b6f238d10a538eccc92b937a69de)
return -1;
}
- if (ctdb->recovery_mode == CTDB_RECOVERY_ACTIVE &&
- client->pid != ctdb->recoverd_pid &&
- ctdb->runstate < CTDB_RUNSTATE_RUNNING) {
+ if (client->pid != ctdb->recoverd_pid &&
+ (ctdb->recovery_mode == CTDB_RECOVERY_ACTIVE ||
+ ctdb->runstate < CTDB_RUNSTATE_STARTUP)) {
struct ctdb_deferred_attach_context *da_ctx = talloc(client, struct ctdb_deferred_attach_context);
if (da_ctx == NULL) {