From f7fa7a6822036b1ae6cc6f974e75d4b975108abd Mon Sep 17 00:00:00 2001 From: Pierre-Yves Chibon Date: Tue, 15 Dec 2015 17:20:48 +0100 Subject: [PATCH 01/21] Upon new package git creation, create symlink to old location --- roles/distgit/templates/pkgdb_sync_git_branches.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/distgit/templates/pkgdb_sync_git_branches.py b/roles/distgit/templates/pkgdb_sync_git_branches.py index fdc1264c6b..92fa5ec4b4 100644 --- a/roles/distgit/templates/pkgdb_sync_git_branches.py +++ b/roles/distgit/templates/pkgdb_sync_git_branches.py @@ -217,6 +217,10 @@ def branch_package(ns, pkgname, requested_branches, existing_branches): if not exists or 'master' not in existing_branches: if not TEST_ONLY: _invoke(SETUP_PACKAGE, [os.path.join(ns, pkgname)]) + if ns == 'rpms': + old_place = os.path.exists(os.path.join( + GIT_FOLDER, '%s.git' % pkgname)) + os.symlink(exists, old_place) # SETUP_PACKAGE creates master if 'master' in requested_branches: requested_branches.remove('master') From 6506d8d97c957421f57371ddee39f7935564ae09 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Tue, 15 Dec 2015 18:07:46 +0000 Subject: [PATCH 02/21] Add some extra bits to the fedmsg nagios payload. --- roles/nagios_server/files/nagios/misccommands.cfg | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/roles/nagios_server/files/nagios/misccommands.cfg b/roles/nagios_server/files/nagios/misccommands.cfg index 1ca641cd71..37a59e0e36 100644 --- a/roles/nagios_server/files/nagios/misccommands.cfg +++ b/roles/nagios_server/files/nagios/misccommands.cfg @@ -86,13 +86,13 @@ define command{ # 'host-notify-by-fedmsg' command definition define command{ command_name host-notify-by-fedmsg - command_line /usr/bin/echo '{"type": "$NOTIFICATIONTYPE$", "host": "$HOSTALIAS$", "state": "$HOSTSTATE$", "host_ack_author": "$HOSTACKAUTHOR$", "service_ack_author": "$SERVICEACKAUTHOR$"}' | fedmsg-logger --cert-prefix nagios --modname nagios --topic host.state.change --json-input + command_line /usr/bin/echo '{"type": "$NOTIFICATIONTYPE$", "host": "$HOSTALIAS$", "state": "$HOSTSTATE$", "output": "$HOSTOUTPUT$", "host_ack_author": "$HOSTACKAUTHOR$", "service_ack_author": "$SERVICEACKAUTHOR$"}' | fedmsg-logger --cert-prefix nagios --modname nagios --topic host.state.change --json-input } # 'notify-by-fedmsg' command definition define command{ command_name notify-by-fedmsg - command_line /usr/bin/echo '{"type": "$NOTIFICATIONTYPE$", "host": "$HOSTALIAS$", "state": "$SERVICESTATE$", "host_ack_author": "$HOSTACKAUTHOR$", "service_ack_author": "$SERVICEACKAUTHOR$"}' | fedmsg-logger --cert-prefix nagios --modname nagios --topic service.state.change --json-input + command_line /usr/bin/echo '{"type": "$NOTIFICATIONTYPE$", "host": "$HOSTALIAS$", "state": "$SERVICESTATE$", "service": "$SERVICEDESC$", "output": "$SERVICEOUTPUT$", "host_ack_author": "$HOSTACKAUTHOR$", "service_ack_author": "$SERVICEACKAUTHOR$"}' | fedmsg-logger --cert-prefix nagios --modname nagios --topic service.state.change --json-input } # 'notify-by-xmpp' command definition From b6a0a56c248aad79eda1e958ac5b6133e2ce7ea4 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Tue, 15 Dec 2015 18:10:24 +0000 Subject: [PATCH 03/21] Make nagios kick mm-frontend* for us until we fix it Signed-off-by: Patrick Uiterwijk --- roles/nagios_server/files/nagios/services/websites.cfg | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/nagios_server/files/nagios/services/websites.cfg b/roles/nagios_server/files/nagios/services/websites.cfg index 359da9fc23..d1840cc036 100644 --- a/roles/nagios_server/files/nagios/services/websites.cfg +++ b/roles/nagios_server/files/nagios/services/websites.cfg @@ -48,6 +48,7 @@ define service { service_description mm-publiclist-internal check_command check_website_publiclist!localhost!/mirrormanager/api/mirroradmins/?name=dl.fedoraproject.org use internalwebsitetemplate + event_handler restart_httpd } define service { From afb05834712d7577164de98f7fa5282a3e4704c4 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Tue, 15 Dec 2015 18:35:19 +0000 Subject: [PATCH 04/21] Only start mailman services on mailman01 or lists-dev --- roles/mailman/tasks/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/mailman/tasks/main.yml b/roles/mailman/tasks/main.yml index 6bdedf9190..f4ec6314f4 100644 --- a/roles/mailman/tasks/main.yml +++ b/roles/mailman/tasks/main.yml @@ -426,3 +426,4 @@ - mailman3 - postfix tags: mailman + when: inventory_hostname.startswith('mailman01') or inventory_hostname.startswith('lists-dev') From 0b2d3f3bd8895bc9cff8e3ac57e7c792ad8e798a Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Tue, 15 Dec 2015 18:39:52 +0000 Subject: [PATCH 05/21] Be more specific here and only include the prod instance, not staging --- roles/mailman/tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/mailman/tasks/main.yml b/roles/mailman/tasks/main.yml index f4ec6314f4..c4a7d5c953 100644 --- a/roles/mailman/tasks/main.yml +++ b/roles/mailman/tasks/main.yml @@ -426,4 +426,4 @@ - mailman3 - postfix tags: mailman - when: inventory_hostname.startswith('mailman01') or inventory_hostname.startswith('lists-dev') + when: inventory_hostname.startswith('mailman01.phx2') or inventory_hostname.startswith('lists-dev') From 8605db93ca7191385f42b76835116235612a7cd5 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Tue, 15 Dec 2015 18:49:44 +0000 Subject: [PATCH 06/21] Need to also set conditional here. --- playbooks/groups/mailman.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/playbooks/groups/mailman.yml b/playbooks/groups/mailman.yml index aeedd36f68..7d282f9952 100644 --- a/playbooks/groups/mailman.yml +++ b/playbooks/groups/mailman.yml @@ -117,6 +117,7 @@ - httpd - mailman3 - postfix + when: inventory_hostname.startswith('mailman01.phx2') or inventory_hostname.startswith('lists-dev') handlers: - include: "{{ handlers }}/restart_services.yml" From 8eebcf0b66ff5436acaa7f4152854d2a962c03a2 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Tue, 15 Dec 2015 18:52:22 +0000 Subject: [PATCH 07/21] Try just checking out this git content as the right user and drop the non idempotent chown after it. --- roles/openqa/server/tasks/main.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/roles/openqa/server/tasks/main.yml b/roles/openqa/server/tasks/main.yml index 2776a0c7e1..51ac6aa59d 100644 --- a/roles/openqa/server/tasks/main.yml +++ b/roles/openqa/server/tasks/main.yml @@ -66,9 +66,8 @@ repo: https://bitbucket.org/rajcze/openqa_fedora dest: /var/lib/openqa/share/tests/fedora register: gittests - -- name: Have tests owned by geekotest - file: path=/var/lib/openqa/share/tests/fedora owner=geekotest recurse=yes + sudo: true + sudo_user: geekotest - name: Check out openqa_fedora_tools git: From e6e54707462f43656655e493a67a45a3e03df391 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Tue, 15 Dec 2015 18:59:01 +0000 Subject: [PATCH 08/21] Add always_run to tasks where we register things we use later. --- roles/openqa/server/tasks/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/openqa/server/tasks/main.yml b/roles/openqa/server/tasks/main.yml index 51ac6aa59d..2f0395f3ab 100644 --- a/roles/openqa/server/tasks/main.yml +++ b/roles/openqa/server/tasks/main.yml @@ -68,6 +68,7 @@ register: gittests sudo: true sudo_user: geekotest + always_run: true - name: Check out openqa_fedora_tools git: @@ -159,6 +160,7 @@ register: initdb changed_when: "initdb.rc == 0" failed_when: "(initdb.rc > 0) and (initdb.stderr is not defined or initdb.stderr.find('already exists') == -1)" + always_run: true - name: Enable and start services service: name={{ item }} enabled=yes state=started @@ -168,6 +170,7 @@ - openqa-webui - openqa-websockets - openqa-gru + always_run: true # This is using a big hammer until #1277312 is resolved - name: Allow Apache to connect to openQA @@ -187,6 +190,7 @@ register: admin changed_when: "admin.rc == 0" failed_when: "(admin.rc > 0) and (admin.stderr is not defined or admin.stderr.find('already exists') == -1)" + always_run: true - name: Patch repo URLs in templates shell: "cp /var/lib/openqa/share/tests/fedora/templates /tmp && sed -i -e 's,dl.fedoraproject,dl.phx2.fedoraproject,g' /tmp/templates" From 1ba59acc08e1c0434f84e36350dc392e13c8853e Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Tue, 15 Dec 2015 19:03:37 +0000 Subject: [PATCH 09/21] Add some more always_run to tasks that register variables. --- roles/openqa/dispatcher/tasks/main.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/roles/openqa/dispatcher/tasks/main.yml b/roles/openqa/dispatcher/tasks/main.yml index e752f329b0..be32f23817 100644 --- a/roles/openqa/dispatcher/tasks/main.yml +++ b/roles/openqa/dispatcher/tasks/main.yml @@ -37,12 +37,14 @@ repo: https://github.com/os-autoinst/openQA-python-client.git dest: /root/openQA-python-client register: gitclient + always_run: true - name: Check if python-client has ever been installed command: "python -c 'import openqa_client'" register: instclient changed_when: "1 != 1" failed_when: "1 != 1" + always_run: true - name: Install openQA-python-client command: "python setup.py install" @@ -57,12 +59,14 @@ repo: https://bitbucket.org/rajcze/openqa_fedora_tools dest: /root/openqa_fedora_tools-dispatcher register: gittools + always_run: true - name: Check if openqa_fedora_tools has ever been installed stat: path=/usr/bin/fedora-openqa-schedule register: insttools changed_when: "1 != 1" failed_when: "1 != 1" + always_run: true - name: Install openqa_fedora_tools command: "python setup.py install" From a26c89b2a9200cb98adc2db6371e495841f0ff47 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Tue, 15 Dec 2015 19:06:19 +0000 Subject: [PATCH 10/21] Add some more always_run magic pixie dust --- roles/check-compose/tasks/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/check-compose/tasks/main.yml b/roles/check-compose/tasks/main.yml index 8534a8c192..b1a5da4a86 100644 --- a/roles/check-compose/tasks/main.yml +++ b/roles/check-compose/tasks/main.yml @@ -40,10 +40,12 @@ repo: https://github.com/os-autoinst/openQA-python-client.git dest: /root/openQA-python-client register: gitclient + always_run: true - name: Check if python-client has ever been installed command: "python -c 'import openqa_client'" register: instclient + always_run: true changed_when: "1 != 1" failed_when: "1 != 1" @@ -58,6 +60,7 @@ repo: https://git.fedorahosted.org/git/fedora-qa.git dest: /root/fedora-qa register: gitqa + always_run: true - name: Build check-compose command: "make prefix=/usr" From 402bfe62152d5182608f74d651f18e13e1207450 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 15 Dec 2015 11:30:13 -0800 Subject: [PATCH 11/21] openqa_server: use guestfs direct backend for creating disks this avoids the need to start and stop libvirtd. --- roles/openqa/server/tasks/main.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/roles/openqa/server/tasks/main.yml b/roles/openqa/server/tasks/main.yml index 2f0395f3ab..5f20cbac29 100644 --- a/roles/openqa/server/tasks/main.yml +++ b/roles/openqa/server/tasks/main.yml @@ -82,38 +82,42 @@ - /var/lib/openqa/share/factory/hdd - /var/lib/openqa/share/factory/repo -- name: Start libvirt service - service: name=libvirtd state=started - # NOTE: this is very hacky, but we can't do much better with the current # disk creation script, I will try and make it better. We'll have to bump -# this hardcoded release number every so often. +# this hardcoded release number every so often. Much better createhdds +# is in review: https://phab.qadevel.cloud.fedoraproject.org/D687 +# LIBGUESTFS_BACKEND is to avoid the need to run libvirt just for this - name: Create hard disk images (this may take a long time!) command: "/root/openqa_fedora_tools/tools/createhdds.sh 23" args: creates: /var/lib/openqa/share/factory/hdd/disk_full_mbr.img chdir: /var/lib/openqa/share/factory/hdd/ + environment: + LIBGUESTFS_BACKEND: direct - name: Create N-2 desktop x86_64 disk image (this may take a long time!) command: "/root/openqa_fedora_tools/tools/createhdds.sh 22 desktop_64bit" args: creates: /var/lib/openqa/share/factory/hdd/disk_f22_desktop_x86_64.img chdir: /var/lib/openqa/share/factory/hdd/ + environment: + LIBGUESTFS_BACKEND: direct - name: Create N-2 desktop i686 disk image (this may take a long time!) command: "/root/openqa_fedora_tools/tools/createhdds.sh 22 desktop_32bit" args: creates: /var/lib/openqa/share/factory/hdd/disk_f22_desktop_i686.img chdir: /var/lib/openqa/share/factory/hdd/ + environment: + LIBGUESTFS_BACKEND: direct - name: Create N-2 minimal x86_64 disk image (this may take a long time!) command: "/root/openqa_fedora_tools/tools/createhdds.sh 22 minimal_64bit" args: creates: /var/lib/openqa/share/factory/hdd/disk_f22_minimal_x86_64.img chdir: /var/lib/openqa/share/factory/hdd/ - -- name: Stop libvirt service - service: name=libvirtd state=stopped + environment: + LIBGUESTFS_BACKEND: direct - name: Create exports file copy: src=exports dest=/etc/exports.d/openqa.exports owner=root group=root mode=0644 From 610869ab8081a03f684adcb2e9b9d56c083d1eb1 Mon Sep 17 00:00:00 2001 From: Kevin Fenzi Date: Tue, 15 Dec 2015 20:25:54 +0000 Subject: [PATCH 12/21] Rework vhost_reboot so that ansible 2.0 likes it. --- playbooks/vhost_reboot.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/playbooks/vhost_reboot.yml b/playbooks/vhost_reboot.yml index b3fdc5beed..b2348fbd34 100644 --- a/playbooks/vhost_reboot.yml +++ b/playbooks/vhost_reboot.yml @@ -35,7 +35,7 @@ # Call out to another playbook. Disable any proxies that may live here - include: update-proxy-dns.yml status=disable proxies=myvms_new:&proxies - when: nodns is not defined or not "true" in nodns + when: nodns is not defined or not nodns - name: halt instances hosts: myvms_new @@ -48,7 +48,7 @@ nagios: action=downtime minutes=30 service=host host={{ inventory_hostname_short }}{{ env_suffix }} delegate_to: noc01.phx2.fedoraproject.org ignore_errors: true - when: nonagios is not defined or not "true" in nonagios + when: nonagios is not defined or not nonagios - name: halt the vm instances - to poweroff command: /sbin/shutdown -h 1 @@ -74,7 +74,7 @@ nagios: action=downtime minutes=60 service=host host={{ inventory_hostname_short }}{{ env_suffix }} delegate_to: noc01.phx2.fedoraproject.org ignore_errors: true - when: nonagios is not defined or not "true" in nonagios + when: nonagios is not defined or not nonagios - name: reboot the virthost command: /sbin/shutdown -r 1 @@ -100,11 +100,11 @@ nagios: action=unsilence service=host host={{ inventory_hostname_short }}{{ env_suffix }} delegate_to: noc01.phx2.fedoraproject.org ignore_errors: true - when: nonagios is not defined or not "true" in nonagios + when: nonagios is not defined or not nonagios # Call out to that dns playbook. Put proxies back in now that they're back - include: update-proxy-dns.yml status=enable proxies=myvms_new:&proxies - when: not "true" in nodns + when: nodns is not defined or not nodns - name: Fix unbound if necessary # intersection - hosts that are in our dynamic group and also in unbound-dns From 616b5f8b18817a830cc54cf514c44028cb8acee2 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Tue, 15 Dec 2015 21:20:25 +0000 Subject: [PATCH 13/21] Add a playbook to rebuild the static sites. --- playbooks/manual/rebuild/websites.yml | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 playbooks/manual/rebuild/websites.yml diff --git a/playbooks/manual/rebuild/websites.yml b/playbooks/manual/rebuild/websites.yml new file mode 100644 index 0000000000..07d03d6d9c --- /dev/null +++ b/playbooks/manual/rebuild/websites.yml @@ -0,0 +1,36 @@ +- name: Force a rebuild of website content on the backend builder + hosts: sundries;sundries-stg + user: root + become: apache + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "/srv/private/ansible/vars.yml" + - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + + tasks: + - name: Run syncStatic (this takes a while)... + command: /usr/local/bin/lock-wrapper syncStatic /usr/local/bin/syncStatic + +- name: Tell the proxies to sync that freshness + hosts: proxies;proxies-stg + user: root + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "/srv/private/ansible/vars.yml" + - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + + tasks: + - name: rsync each site in to place + command: /usr/bin/rsync --delete -a --no-owner --no-group sundries01::{{item}}/ /srv/web/{{item}}/ + with_items: + - getfedora.org + - arm.fedoraproject.org + - boot.fedoraproject.org + - fedoracommunity.org + - developer.fedoraproject.org + - fedoraproject.org + - fudcon.fedoraproject.org + - labs.fedoraproject.org + - mirrors.fedoraproject.org + - spins.fedoraproject.org + - start.fedoraproject.org From 0e4f269a4c1976313766528f55b5d53f06ce91f0 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Tue, 15 Dec 2015 21:26:53 +0000 Subject: [PATCH 14/21] Leave out sundries02. --- playbooks/manual/rebuild/websites.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/playbooks/manual/rebuild/websites.yml b/playbooks/manual/rebuild/websites.yml index 07d03d6d9c..a0e2abd50c 100644 --- a/playbooks/manual/rebuild/websites.yml +++ b/playbooks/manual/rebuild/websites.yml @@ -1,5 +1,5 @@ - name: Force a rebuild of website content on the backend builder - hosts: sundries;sundries-stg + hosts: sundries01* user: root become: apache vars_files: From d8ef7c0ad6d5a117f3087721fc2073e8e3e6c22c Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 15 Dec 2015 14:14:54 -0800 Subject: [PATCH 15/21] openqa_server: try a new approach for checking test changes basically, dump the config from the server before loading the templates file, dump it after, and use json_diff to compare. I wanted to make the actual template loading script from openQA do some kind of check in '--clean' mode, but given how it's designed that's not really terribly practical without doing some major re-architecting, and this seems like a relatively simple alternative. With this change, the actual "Load tests" step will never show 'changed', but the subsequent 'Check if the tests changed in previous step' step will show as changed when appropriate. --- roles/openqa/server/tasks/main.yml | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/roles/openqa/server/tasks/main.yml b/roles/openqa/server/tasks/main.yml index 5f20cbac29..07ea66a8a6 100644 --- a/roles/openqa/server/tasks/main.yml +++ b/roles/openqa/server/tasks/main.yml @@ -50,6 +50,7 @@ - libselinux-python - openqa - git + - json_diff - libselinux-utils - libsemanage-python - nfs-utils @@ -201,8 +202,23 @@ when: "gittests|changed" changed_when: "1 != 1" -# This will always show as changed, even when nothing in the templates -# changed; this is a bit hard to fix +- name: Dump existing config for checking changes + shell: "/usr/share/openqa/script/dump_templates --json > /tmp/tmpl-old.json" + when: "gittests|changed" + changed_when: "1 != 1" + +# Because of the boring details of how template loading works, getting +# a correct 'changed' for this step is too difficult. Instead we have +# the prior and following steps; when the templates actually changed, +# the *following* step will register as changed. - name: Load tests shell: "/tmp/templates --clean" when: "gittests|changed" + changed_when: "1 != 1" + +- name: Check if the tests changed in previous step + command: "/usr/share/openqa/script/dump_templates --json > /tmp/tmpl-new.json && json_diff /tmp/tmpl-old.json /tmp/tmpl-new.json" + when: "gittests|changed" + register: testsdiff + changed_when: "testsdiff.rc > 0" + failed_when: "1 != 1" From 39e50d2315b40845194ca4afe70bbab6c94326e2 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Tue, 15 Dec 2015 22:26:46 +0000 Subject: [PATCH 16/21] Fix permissions. --- playbooks/manual/rebuild/websites.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/playbooks/manual/rebuild/websites.yml b/playbooks/manual/rebuild/websites.yml index a0e2abd50c..acae331f5b 100644 --- a/playbooks/manual/rebuild/websites.yml +++ b/playbooks/manual/rebuild/websites.yml @@ -1,7 +1,8 @@ - name: Force a rebuild of website content on the backend builder hosts: sundries01* user: root - become: apache + become: true + become_user: apache vars_files: - /srv/web/infra/ansible/vars/global.yml - "/srv/private/ansible/vars.yml" From 4527a7973a2255d987de6d897aa711ed6c1e8b45 Mon Sep 17 00:00:00 2001 From: Robert Mayr Date: Tue, 15 Dec 2015 22:52:21 +0000 Subject: [PATCH 17/21] build fedoraproject.org once more --- roles/fedora-web/build/files/syncStatic.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/roles/fedora-web/build/files/syncStatic.sh b/roles/fedora-web/build/files/syncStatic.sh index 29ae94d9b3..0a90314bce 100644 --- a/roles/fedora-web/build/files/syncStatic.sh +++ b/roles/fedora-web/build/files/syncStatic.sh @@ -68,3 +68,4 @@ build boot.fedoraproject.org build fedoracommunity.org build fudcon.fedoraproject.org build start.fedoraproject.org +build fedoraproject.org From a1a1dcc5b234be81ff8a692553fe9d09ab202cf2 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Tue, 15 Dec 2015 23:00:26 +0000 Subject: [PATCH 18/21] hotspot.txt. --- playbooks/manual/rebuild/files/hotspot.txt | 1 + playbooks/manual/rebuild/hotspot.yml | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 playbooks/manual/rebuild/files/hotspot.txt create mode 100644 playbooks/manual/rebuild/hotspot.yml diff --git a/playbooks/manual/rebuild/files/hotspot.txt b/playbooks/manual/rebuild/files/hotspot.txt new file mode 100644 index 0000000000..d86bac9de5 --- /dev/null +++ b/playbooks/manual/rebuild/files/hotspot.txt @@ -0,0 +1 @@ +OK diff --git a/playbooks/manual/rebuild/hotspot.yml b/playbooks/manual/rebuild/hotspot.yml new file mode 100644 index 0000000000..f059f0d1bb --- /dev/null +++ b/playbooks/manual/rebuild/hotspot.yml @@ -0,0 +1,11 @@ +- name: Put a hotspot.txt file in place. + hosts: proxies;proxies-stg + user: root + vars_files: + - /srv/web/infra/ansible/vars/global.yml + - "/srv/private/ansible/vars.yml" + - /srv/web/infra/ansible/vars/{{ ansible_distribution }}.yml + + tasks: + - file: dest=/srv/web/fedoraproject.org/static/ state=directory + - copy: src=hotspot.txt dest=/srv/web/fedoraproject.org/static/hotspot.txt From 433cd51dd8decb8ac8379d379b0967a88025641e Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Tue, 15 Dec 2015 23:01:11 +0000 Subject: [PATCH 19/21] Move that. --- playbooks/manual/rebuild/{files => }/hotspot.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename playbooks/manual/rebuild/{files => }/hotspot.txt (100%) diff --git a/playbooks/manual/rebuild/files/hotspot.txt b/playbooks/manual/rebuild/hotspot.txt similarity index 100% rename from playbooks/manual/rebuild/files/hotspot.txt rename to playbooks/manual/rebuild/hotspot.txt From a3f1177b5b247ce514a720d45abb54b96a645839 Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Tue, 15 Dec 2015 23:03:53 +0000 Subject: [PATCH 20/21] Make hotspot.txt a specially deployed file This should make it more resilient to changes to the website Signed-off-by: Patrick Uiterwijk --- roles/fedora-web/main/files/hotspot.conf | 1 + roles/fedora-web/main/tasks/main.yml | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100644 roles/fedora-web/main/files/hotspot.conf diff --git a/roles/fedora-web/main/files/hotspot.conf b/roles/fedora-web/main/files/hotspot.conf new file mode 100644 index 0000000000..8a5222931d --- /dev/null +++ b/roles/fedora-web/main/files/hotspot.conf @@ -0,0 +1 @@ +Alias /static/hotspot.txt /srv/web/hotspot.txt diff --git a/roles/fedora-web/main/tasks/main.yml b/roles/fedora-web/main/tasks/main.yml index a4a4739fb0..93788387ff 100644 --- a/roles/fedora-web/main/tasks/main.yml +++ b/roles/fedora-web/main/tasks/main.yml @@ -13,6 +13,7 @@ - languages.conf - cache.conf - persona.conf + - hotspot.conf - expires.conf - deflate.conf notify: @@ -33,6 +34,14 @@ - fedora-web - fedora-web/main +- name: Create a file for hotspot + copy: dest=/srv/web/hotspot.txt content="OK" + owner=root group=root mode=0644 + setype=httpd_sys_content_t + tags: + - fedora-web + - fedora-web/main + - name: And, copy over a template for browserid template: > src=browserid.fedoraproject.org dest=/srv/web/browserid.fedoraproject.org From b08ccc52ef744ce433e5053e9b5106c266fece0e Mon Sep 17 00:00:00 2001 From: Patrick Uiterwijk Date: Tue, 15 Dec 2015 23:09:06 +0000 Subject: [PATCH 21/21] Add emergency tag Signed-off-by: Patrick Uiterwijk --- roles/fedora-web/main/tasks/main.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/roles/fedora-web/main/tasks/main.yml b/roles/fedora-web/main/tasks/main.yml index 93788387ff..cd4d45f981 100644 --- a/roles/fedora-web/main/tasks/main.yml +++ b/roles/fedora-web/main/tasks/main.yml @@ -21,6 +21,7 @@ tags: - fedora-web - fedora-web/main + - fedora-web/hotspot - name: And one template (for {{website}}) template: > @@ -41,6 +42,7 @@ tags: - fedora-web - fedora-web/main + - fedora-web/hotspot - name: And, copy over a template for browserid template: >