diff --git a/playbooks/manual/upgrade/pagure.yml b/playbooks/manual/upgrade/pagure.yml index ccaae8bbb0..bf45494317 100644 --- a/playbooks/manual/upgrade/pagure.yml +++ b/playbooks/manual/upgrade/pagure.yml @@ -29,6 +29,10 @@ delegate_to: noc01.phx2.fedoraproject.org ignore_errors: true +## +## To do here. Call a play which can set status to say pagure is down. +## + tasks: - name: yum update pagure packages from main repo yum: name="pagure*" @@ -44,22 +48,10 @@ when: testing # This is needed so the alembic will work. - - name: stop httpd so we can update the database - service: name="httpd" state=stopped - - - name: Upgrade the database - command: /usr/bin/alembic -c /etc/pagure/alembic.ini upgrade head - args: - chdir: /etc/pagure/ - environment: - PAGURE_CONFIG: /etc/pagure/pagure.cfg - - post_tasks: - - - name: restart_pagure_workers on all hosts + - name: stop the general pagure workers service: name: "{{ item }}" - state: restarted + state: stopped with_items: - httpd - pagure_ev @@ -69,10 +61,10 @@ - pagure_webhook - pagure_worker - - name: restart_pagure_workers on pagure servers + - name: stop the specific workers on pagure.io service: name: "{{ item }}" - state: restarted + state: stopped with_items: - pagure_ci - pagure_fast_worker @@ -83,6 +75,47 @@ - pagure_slow_worker when: inventory_hostname.startswith('pagure') + - name: Upgrade the database + command: /usr/bin/alembic -c /etc/pagure/alembic.ini upgrade head + args: + chdir: /etc/pagure/ + environment: + PAGURE_CONFIG: /etc/pagure/pagure.cfg + + post_tasks: + + - name: start the general pagure workers + service: + name: "{{ item }}" + state: started + with_items: + - httpd + - pagure_ev + - pagure_gitolite_worker + - pagure_logcom + - pagure_milter + - pagure_webhook + - pagure_worker + + - name: start_pagure_workers on pagure servers + service: + name: "{{ item }}" + state: started + with_items: + - pagure_ci + - pagure_fast_worker + - pagure_loadjson + - pagure_logcom + - pagure_medium_worker + - pagure_mirror + - pagure_slow_worker + when: inventory_hostname.startswith('pagure') + +## +## ToDo: Put in an include to pull in setting status back +## + + - name: tell nagios to unshush w.r.t. the frontend nagios: action=unsilence