From: Zooko O'Whielacronx Date: Thu, 12 Feb 2009 22:21:31 +0000 (-0700) Subject: nodeadmin: node stops itself if a hotline file hasn't been touched in 60 seconds... X-Git-Tag: allmydata-tahoe-1.3.0~20 X-Git-Url: https://git.rkrishnan.org/pf/content/en/footer/bar.txt?a=commitdiff_plain;h=8303f90da05648df0933e2b77c29d8c11b7979f8;p=tahoe-lafs%2Ftahoe-lafs.git nodeadmin: node stops itself if a hotline file hasn't been touched in 60 seconds now, instead of in 40 seconds A test failed on draco (MacPPC) because it took 49 seconds to get around to running the test, and the node had already stopped itself when the hotline file was 40 seconds old. --- diff --git a/src/allmydata/client.py b/src/allmydata/client.py index 73849c98..b8577978 100644 --- a/src/allmydata/client.py +++ b/src/allmydata/client.py @@ -295,7 +295,7 @@ class Client(node.Node, pollmixin.PollMixin): def _check_hotline(self, hotline_file): if os.path.exists(hotline_file): mtime = os.stat(hotline_file)[stat.ST_MTIME] - if mtime > time.time() - 40.0: + if mtime > time.time() - 60.0: return else: self.log("hotline file too old, shutting down") diff --git a/src/allmydata/test/test_runner.py b/src/allmydata/test/test_runner.py index ac3f88b6..9ced2a71 100644 --- a/src/allmydata/test/test_runner.py +++ b/src/allmydata/test/test_runner.py @@ -405,7 +405,7 @@ class RunNode(unittest.TestCase, pollmixin.PollMixin, common_util.SignalMixin, def _cb(res): out, err, rc_or_sig = res self.failUnlessEqual(rc_or_sig, 0) - # By writing this file, we get forty seconds before the client will exit. This insures + # By writing this file, we get sixty seconds before the client will exit. This insures # that even if the 'stop' command doesn't work (and the test fails), the client should # still terminate. open(HOTLINE_FILE, "w").write("")