From fdb0200ecad291e259fe46ca03bc5aeccd5008ee Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Tue, 24 Feb 2009 21:42:13 -0700 Subject: [PATCH] #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 --- src/allmydata/scripts/startstop_node.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) 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: -- 2.45.2