Fix requestid setting on graceful shutdown monitoring. r=bustage FIREFOX_27_0_1_BUILD1 FIREFOX_27_0_1_RELEASE
authorBen Hearsum <bhearsum@mozilla.com>
Wed, 12 Feb 2014 10:35:47 -0500
changeset 4375 a7558bfeff482ff85c545109d5d9aa2dd3751ed1
parent 4374 5def8f0f15a03a0507c26e205b0b9ffd1978cfd4
child 4376 655a0b378e11f764fd785cd2cfbdbd12ef57e9b5
push id3193
push userbhearsum@mozilla.com
push dateWed, 12 Feb 2014 15:35:56 +0000
reviewersbustage
Fix requestid setting on graceful shutdown monitoring. r=bustage
buildfarm/maintenance/reboot-idle-slaves.py
setup.py
--- a/buildfarm/maintenance/reboot-idle-slaves.py
+++ b/buildfarm/maintenance/reboot-idle-slaves.py
@@ -63,18 +63,18 @@ def process_slave(slaveapi, slave, dryru
         # it picks up a job before us making the decision to reboot it, and the
         # reboot actually happening. In most cases this will happen nearly
         # instantly.
         log.debug("%s - Setting graceful shutdown", slave)
         url = furl(slaveapi)
         url.path.add("slaves").add(slave).add("actions").add("shutdown_buildslave")
         url.args["waittime"] = 30
         r = retry(requests.post, args=(str(url),)).json()
+        url.args["requestid"] = r["requestid"]
         while r["state"] in (PENDING, RUNNING):
-            url.args["requestid"] = r["requestid"]
             time.sleep(30)
             r = retry(requests.get, args=(str(url),)).json()
 
         if r["state"] == FAILURE:
             log.info("%s - Graceful shutdown failed, aborting reboot", slave)
             return
 
         log.info("%s - Graceful shutdown finished, rebooting", slave)
--- a/setup.py
+++ b/setup.py
@@ -1,15 +1,15 @@
 #! /usr/bin/env python
 
 from setuptools import setup, find_packages
 
 setup(
     name="buildtools",
-    version="1.0.2",
+    version="1.0.3",
     description="Mozilla RelEng Toolkit",
     author="Release Engineers",
     author_email="release@mozilla.com",
 
     # python packages are under lib/python.  Note that there are several
     # top-level packages here -- not just a buildtools package
 
     packages=find_packages("lib/python"),