ctdb-common: Map ENOENT for a missing event script to ENOEXEC
This handles the case where an event script is disabled by unlinking,
while an event is being run, after the script list has been created.
Without this change the script will fail. With this change the script
will be marked as DISABLED. See the comment added by this commit for
more details.
Add a testcase to simulate the race, using an event script to disable
subsequent ones.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15755
RN: Avoid event failure race when disabling an event script
Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Thu Nov 21 01:42:09 UTC 2024 on atb-devel-224
(cherry picked from commit
fee31b6cb2b8f7dd111bdd9d2ff5479c31cbca37)
Autobuild-User(v4-20-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-20-test): Fri Dec 6 15:19:41 UTC 2024 on atb-devel-224