From: Zooko O'Whielacronx Date: Tue, 30 Dec 2008 08:20:22 +0000 (-0700) Subject: cli: make startstop_node wait 20 seconds instead of 5 for a process to go away after... X-Git-Url: https://git.rkrishnan.org/%5B/rgr-080307.php?a=commitdiff_plain;h=8d83699783f326efc2568b0bfe1084a7ad31fce0;p=tahoe-lafs%2Ftahoe-lafs.git cli: make startstop_node wait 20 seconds instead of 5 for a process to go away after we signalled it to go away Because the unit tests on the VirtualZooko buildslave failed when it took 16 seconds for a process to go away. Perhaps getting notification after only 5 seconds instead of 20 seconds is desirable, and we should change the unit tests and set this back to 5, but I don't know exactly how to change the unit tests. Perhaps match this particular warning message about the shutdown taking a while and allow the code under test to pass if the only stderr that it emits is this warning. --- diff --git a/src/allmydata/scripts/startstop_node.py b/src/allmydata/scripts/startstop_node.py index 056f76f7..3e366cf7 100644 --- a/src/allmydata/scripts/startstop_node.py +++ b/src/allmydata/scripts/startstop_node.py @@ -105,7 +105,7 @@ def do_stop(basedir, out=sys.stdout, err=sys.stderr): pid = int(pid) # kill it hard (SIGKILL), delete the twistd.pid file, then wait for the - # process itself to go away. If it hasn't gone away after 5 seconds, warn + # process itself to go away. If it hasn't gone away after 20 seconds, warn # the user but keep waiting until they give up. try: os.kill(pid, signal.SIGKILL) @@ -123,7 +123,7 @@ def do_stop(basedir, out=sys.stdout, err=sys.stderr): pass start = time.time() time.sleep(0.1) - wait = 5 + wait = 20 first_time = True while True: # poll once per second until we see the process is no longer running