ansible: wait for Apache workers to drain instead of network connections
authorGregory Szorc <gps@mozilla.com>
Wed, 22 Apr 2015 11:57:04 -0700
changeset 360706 647dbc860b667d4784de497b18c490015ee2d9b4
parent 360705 45c2e342cd74fece0cbf533f09a791767f968b75
child 360707 37c6168022ee2ff29467925eb781d1278eeef436
push id16998
push userrwood@mozilla.com
push dateMon, 02 May 2016 19:42:03 +0000
ansible: wait for Apache workers to drain instead of network connections Ansible's wait_for module waits for connections in TIME_WAIT state. This is not very usable since connections can linger in TIME_WAIT for minutes. Wait on Apache workers instead.
ansible/deploy-mozreview-prod.yml
--- a/ansible/deploy-mozreview-prod.yml
+++ b/ansible/deploy-mozreview-prod.yml
@@ -46,17 +46,17 @@
         node: "{{ inventory_hostname }}:80"
         state: draining
         url: https://zlb1.ops.scl3.mozilla.com:9070/
         username: "{{ ldap_username }}"
         password: "{{ ldap_password }}"
       delegate_to: 127.0.0.1
 
     - name: wait for HTTP server to drain
-      wait_for: port=80 state=drained timeout=60
+      apache_worker_drain: url=http://localhost/server-status timeout=300
 
   tasks:
     - name: sync code from admin node
       command: /data/bin/update-www.sh reviewboard.mozilla.org
 
     - name: restart memcached
       service: name=memcached state=restarted