From: Brian Warner Date: Wed, 25 Feb 2009 04:42:13 +0000 (-0700) Subject: #165: make 'tahoe restart --force' the default behavior: warn but do not stop if... X-Git-Url: https://git.rkrishnan.org/pf/content/simplejson/statistics?a=commitdiff_plain;h=fdb0200ecad291e259fe46ca03bc5aeccd5008ee;p=tahoe-lafs%2Ftahoe-lafs.git #165: make 'tahoe restart --force' the default behavior: warn but do not stop if restart is used on something that wasn't a running node, and always try to start it afterwards. This is particularly important for #315 (restart -m), because otherwise a single not-already-running node will prevent all nodes from being restarted, resulting in longer downtime than necessary --- diff --git a/src/allmydata/scripts/startstop_node.py b/src/allmydata/scripts/startstop_node.py index d23ad39e..a6f4e239 100644 --- a/src/allmydata/scripts/startstop_node.py +++ b/src/allmydata/scripts/startstop_node.py @@ -23,9 +23,6 @@ class RestartOptions(BasedirMixin, usage.Options): ["basedir", "C", None, "which directory to restart the node in"], ] optFlags = [ - ["force", "f", "if the node is not already running, start it " - "instead of complaining that you should have used 'start' instead " - "of 'restart'"], ["profile", "p", "whether to run under the Python profiler, putting results in \"profiling_results.prof\""], ["syslog", None, "tell the node to log to syslog, not a file"], ] @@ -178,7 +175,7 @@ def restart(config, stdout, stderr): rc = 0 for basedir in config['basedirs']: rc = do_stop(basedir, stdout, stderr) or rc - if rc == 2 and config['force']: + if rc == 2: print >>stderr, "ignoring couldn't-stop" rc = 0 if rc: