It looks like this restart was accidentally reintroduced in commit
fc0678d351187cfa4c71123f97c0f493aacd5d16 when $service_reconfigure
became unset so the default action of restarting the service would
occur. From there cleanups have explicitly reintroduced it and
carried it through the code.
Also update the unit tests affected by this change.
The restart was originally removed in commit
bc481c3f1a44c50648488c4f8a7f15ec395d446f.
The default reconfigure action of restarting a service is clearly
suboptimal and will be addressed in a separate patch.
Signed-off-by: Martin Schwenke <martin@meltin.net>
(This used to be ctdb commit
2629de72e1f37b5e46772c2ef8d8d0012fc4ed37)
}
service_reconfigure ()
{
- startstop_nfs restart
-
# if the ips have been reallocated, we must restart the lockmanager
# across all nodes and ping all statd listeners
[ -x $CTDB_BASE/statd-callout ] && {
ok <<EOF
Reconfiguring service "nfs"...
-Starting nfslock: OK
-Starting nfs: OK
EOF
simple_test_event "ipreallocated"
# to split this into 2 tests.
ok <<EOF
Reconfiguring service "nfs"...
-Starting nfslock: OK
-Starting nfs: OK
Replaying previous status for this script due to reconfigure...
EOF
required_result 1 <<EOF
Reconfiguring service "nfs"...
-Starting nfslock: OK
-Starting nfs: OK
Replaying previous status for this script due to reconfigure...
$err
EOF
required_result 1 <<EOF
Reconfiguring service "nfs"...
-Starting nfslock: OK
-Starting nfs: OK
Replaying previous status for this script due to reconfigure...
[Replay of TIMEDOUT scriptstatus - note incorrect return code.] $err
EOF
ok <<EOF
Reconfiguring service "nfs"...
-Starting nfslock: OK
-Starting nfs: OK
Replaying previous status for this script due to reconfigure...
[Replay of DISABLED scriptstatus - note incorrect return code.] $err
EOF
ok <<EOF
Reconfiguring service "nfs"...
-Starting nfslock: OK
-Starting nfs: OK
EOF
simple_test_event "reconfigure"