Eventscripts: Do not restart NFS on reconfigure
authorMartin Schwenke <martin@meltin.net>
Tue, 4 Dec 2012 03:52:25 +0000 (14:52 +1100)
committerAmitay Isaacs <amitay@gmail.com>
Sun, 6 Jan 2013 23:35:39 +0000 (10:35 +1100)
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)

ctdb/config/events.d/60.nfs
ctdb/tests/eventscripts/60.nfs.multi.001.sh
ctdb/tests/eventscripts/60.nfs.multi.002.sh
ctdb/tests/eventscripts/60.nfs.multi.003.sh
ctdb/tests/eventscripts/60.nfs.multi.004.sh
ctdb/tests/eventscripts/60.nfs.multi.005.sh
ctdb/tests/eventscripts/60.nfs.multi.006.sh

index ef2c1f72d9f8d3667a312e8f4f6f98fcf7964d8b..69a99dc1e6b251e583ee2f35787617dbf1998dd8 100755 (executable)
@@ -16,8 +16,6 @@ service_stop ()
 }
 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 ] && {
index e578c56c326d71aefcfdbab3ac932d6164c471e5..f983df7615a381748a714b735c303a70c99e4969 100755 (executable)
@@ -14,8 +14,6 @@ simple_test_event "takeip" $public_address
 
 ok <<EOF
 Reconfiguring service "nfs"...
-Starting nfslock: OK
-Starting nfs: OK
 EOF
 
 simple_test_event "ipreallocated"
index 0c203cdf25782a2a6ad87cd8c744eada91372470..350c1bc726d671298e43ceae2c5773a3cf58f82d 100755 (executable)
@@ -17,8 +17,6 @@ simple_test_event "takeip" $public_address
 # 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
 
index 31867b27898215e0a31b36afbb07e32dd9415e20..68f45ab15dd3feb314c57876b67ccab0871333b1 100755 (executable)
@@ -18,8 +18,6 @@ ctdb_fake_scriptstatus 1 "ERROR" "$err"
 
 required_result 1 <<EOF
 Reconfiguring service "nfs"...
-Starting nfslock: OK
-Starting nfs: OK
 Replaying previous status for this script due to reconfigure...
 $err
 EOF
index 6220ad346ce4aace5eca487ae4c41a20ec51ce6d..b071ec8bd9bc9a7da54b08e9258832bbf7030d8f 100755 (executable)
@@ -18,8 +18,6 @@ ctdb_fake_scriptstatus -62 "TIMEDOUT" "$err"
 
 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
index 1a8200c9fc2ad6f63735addb5cb1d580eeb5759b..82802aa01e8bcc68cf8801112a8b5a880b16b17a 100755 (executable)
@@ -18,8 +18,6 @@ ctdb_fake_scriptstatus -8 "DISABLED" "$err"
 
 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
index 21beaadceafae7fb0001c4d4c5e939bf28e07022..84bb9ef06689af69e59797e8c24fcf10e8c85213 100755 (executable)
@@ -13,8 +13,6 @@ err=""
 
 ok <<EOF
 Reconfiguring service "nfs"...
-Starting nfslock: OK
-Starting nfs: OK
 EOF
 
 simple_test_event "reconfigure"