DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (561f2b6ba128)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
---
- hosts: hgweb-prod
  serial: 4
  vars:
    zlb: https://zlb1.ops.scl3.mozilla.com:9070/
  vars_prompt:
    - name: ldap_username
      prompt: "What is your Mozilla LDAP username?"
      private: no
    - name: ldap_password
      prompt: "What is your Mozilla LDAP password?"
      private: yes

  pre_tasks:
    - name: take node out of load balancer
      stingray_node:
        pool: hgweb-http
        node: "{{ hostvars[inventory_hostname].ansible_bond0.ipv4.address | mandatory }}:80"
        state: draining
        url: "{{ zlb }}"
        username: "{{ ldap_username }}"
        password: "{{ ldap_password }}"
        lockfile: hgweb.lock
      delegate_to: 127.0.0.1

  tasks:
    - name: wait for HTTP server to drain
      apache_worker_drain: url=http://localhost/server-status timeout=3600

    - name: reclone repository
      hgweb_reclone: repo={{ item }}
      with_items: "{{ repos }}"

  post_tasks:
    - name: add node back to load balancer
      stingray_node:
        pool: hgweb-http
        node: "{{ hostvars[inventory_hostname].ansible_bond0.ipv4.address | mandatory }}:80"
        state: active
        url: "{{ zlb }}"
        username: "{{ ldap_username }}"
        password: "{{ ldap_password }}"
        lockfile: hgweb.lock
      delegate_to: 127.0.0.1

    - name: wait for load balancer to re-add node
      pause: seconds=15