]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:cleanupd: use MSG_SMB_BRL_VALIDATE to signal cleanupd unclean process shutdown
authorRalph Boehme <slow@samba.org>
Mon, 30 Apr 2018 17:03:41 +0000 (19:03 +0200)
committerJeremy Allison <jra@samba.org>
Thu, 3 May 2018 22:11:24 +0000 (00:11 +0200)
Since 6423ca4bf293cac5e2f84b1a37bb29b06b5c05ed messaging_send_all()
broadcasts messages in a cluster, so cleanupd receives those broadcasts
and acts upon it by re-broadcasting the message. Result: message
storm.

By reactivating the currently unused MSG_SMB_BRL_VALIDATE for the
trigger message to cleanupd we avoid the storm.

Note that MSG_SMB_BRL_VALIDATE was unused only in the sense that noone
*listened* to it, but we were still *sending* the message in
smbd_parent_ctdb_reconfigured(). de6fe2a1dd6ab03b1c369b61da17fded72305b2d
removed listening for MSG_SMB_BRL_VALIDATE from cleanupd. This commits
brings it back.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=13414

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/smbd/server.c
source3/smbd/smbd_cleanupd.c

index e7e297f1f1862c9a3f9f788741dafa93ede13306..07d7136ef41433acff773c6d93bfcc253e30787a 100644 (file)
@@ -757,7 +757,7 @@ static void cleanup_timeout_fn(struct tevent_context *event_ctx,
        parent->cleanup_te = NULL;
 
        messaging_send_buf(parent->msg_ctx, parent->cleanupd,
-                          MSG_SMB_UNLOCK, NULL, 0);
+                          MSG_SMB_BRL_VALIDATE, NULL, 0);
 }
 
 static void cleanupd_started(struct tevent_req *req)
index 5bd18c1411c80b480a872d98433617be6f8c484c..a9b1e8a1137fab429a897d6fbc3d2a85511b2320 100644 (file)
@@ -71,7 +71,7 @@ struct tevent_req *smbd_cleanupd_send(TALLOC_CTX *mem_ctx,
                return tevent_req_post(req, ev);
        }
 
-       status = messaging_register(msg, NULL, MSG_SMB_UNLOCK,
+       status = messaging_register(msg, NULL, MSG_SMB_BRL_VALIDATE,
                                    smbd_cleanupd_unlock);
        if (tevent_req_nterror(req, status)) {
                return tevent_req_post(req, ev);