mirror of
https://github.com/samba-team/samba.git
synced 2024-12-25 23:21:54 +03:00
8eb20c2347
Currently the lock is held until the corresponding eventscript completes, since the process still exists. If the regular part of an eventscript hangs then the lock might unnecessarily be held for a long time. The pathological case is when a monitor event gets stuck in D-wait state and the script times out but can't be killed so the lock is still held. This can cause an unwanted monitor replay. Change this so that the lock is released immediately after the reconfiguration is complete. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
27 lines
547 B
Bash
Executable File
27 lines
547 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. "${TEST_SCRIPTS_DIR}/unit.sh"
|
|
|
|
define_test "takeip, take reconfigure lock, monitor -> reconfigure, replay timedout"
|
|
|
|
setup_nfs
|
|
|
|
public_address=$(ctdb_get_1_public_address)
|
|
|
|
err="waiting, waiting..."
|
|
|
|
ok_null
|
|
|
|
simple_test_event "takeip" $public_address
|
|
|
|
ctdb_fake_scriptstatus -62 "TIMEDOUT" "$err"
|
|
|
|
eventscript_call ctdb_reconfigure_take_lock
|
|
|
|
required_result 1 <<EOF
|
|
Replaying previous status for this script due to reconfigure...
|
|
[Replay of TIMEDOUT scriptstatus - note incorrect return code.] $err
|
|
EOF
|
|
|
|
simple_test_event "monitor"
|