From b9c701140a4fc51d3dae11dedb68bf6d9b2693bf Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Wed, 2 Sep 2015 17:02:54 +0000 Subject: [PATCH] Split bodhi-backend stuff out amongst the two nodes. --- handlers/restart_services.yml | 3 +++ inventory/group_vars/bodhi-backend | 24 +------------------ inventory/group_vars/bodhi2 | 2 +- .../bodhi-backend01.phx2.fedoraproject.org | 24 +++++++++++++++++++ .../bodhi-backend02.phx2.fedoraproject.org | 20 ++++++++++++++++ .../bodhi2/base/templates/updates_handler.py | 5 ++-- 6 files changed, 52 insertions(+), 26 deletions(-) diff --git a/handlers/restart_services.yml b/handlers/restart_services.yml index 6b74109e10..a0b02bb2fd 100644 --- a/handlers/restart_services.yml +++ b/handlers/restart_services.yml @@ -22,6 +22,9 @@ - name: restart fedmsg-hub command: /usr/local/bin/conditional-restart.sh fedmsg-hub fedmsg-hub + # Note that, we're cool with arbitrary restarts on bodhi-backend02, just + # not bodhi-backend01. 01 is where the releng/mash stuff happens and we + # don't want to interrupt that. when: inventory_hostname != 'bodhi-backend01.phx2.fedoraproject.org' - name: restart fedmsg-irc diff --git a/inventory/group_vars/bodhi-backend b/inventory/group_vars/bodhi-backend index b02c744024..5403669129 100644 --- a/inventory/group_vars/bodhi-backend +++ b/inventory/group_vars/bodhi-backend @@ -72,26 +72,4 @@ nfs_mount_opts: "rw,hard,bg,intr,noatime,nodev,nosuid,nfsvers=3" fas_client_groups: sysadmin-releng sudoers: "{{ private }}/files/sudo/arm-releng-sudoers" - -# For the MOTD -csi_security_category: Medium -csi_primary_contact: Releng Admins sysadmin-releng-members@fedoraproject.org -csi_purpose: Run the Bodhi masher. -csi_relationship: | - The mashing of repos here happens as part of the 'fedmsg-hub' daemon. Check - logs with 'journalctl -u fedmsg-hub'. Check the bodhi masher docs/code for - more detail on what it does: - https://github.com/fedora-infra/bodhi/blob/develop/bodhi/consumers/masher.py - - * This host relies on: - * db01 for its database, which is shares with the bodhi2 frontend nodes. - * An NFS mount of koji data in /mnt/koji/ - * The fedmsg bus for triggering mashes. - * XMLRPC calls to koji for tagging and untagging updates. - * bugzilla for posting comments about status changes - * the wiki for getting information about QA "Test Cases" - * taksotron (resultsdb) for getting status-check results (gating updates). - - * No other systems rely directly on this host. Everything depends on it - indirectly for the creation of new updates repos (which get synced out to - the master mirror for distribution. +## XXX - note that the csi_ stuff is kept at the host_vars/ level. diff --git a/inventory/group_vars/bodhi2 b/inventory/group_vars/bodhi2 index 425906aa5d..3d26311fa3 100644 --- a/inventory/group_vars/bodhi2 +++ b/inventory/group_vars/bodhi2 @@ -79,7 +79,7 @@ csi_relationship: | * taksotron (resultsdb) for getting status-check results (gating updates). * It also depends on these things, but we're trying to move them exclusively - to the backend. + to bodhi-backend02. * koji for tagging and untagging updates and listing candidate builds * bugzilla, for getting bug title information and for posting comments about status changes diff --git a/inventory/host_vars/bodhi-backend01.phx2.fedoraproject.org b/inventory/host_vars/bodhi-backend01.phx2.fedoraproject.org index 2b8564166b..197cc49fae 100644 --- a/inventory/host_vars/bodhi-backend01.phx2.fedoraproject.org +++ b/inventory/host_vars/bodhi-backend01.phx2.fedoraproject.org @@ -8,3 +8,27 @@ volgroup: /dev/vg_Server eth0_ip: 10.5.125.135 eth1_ip: 10.5.127.61 vmhost: bvirthost10.phx2.fedoraproject.org + + +# For the MOTD +csi_security_category: Medium +csi_primary_contact: Releng Admins sysadmin-releng-members@fedoraproject.org +csi_purpose: Run the Bodhi masher. +csi_relationship: | + The mashing of repos here happens as part of the 'fedmsg-hub' daemon. Check + logs with 'journalctl -u fedmsg-hub'. Check the bodhi masher docs/code for + more detail on what it does: + https://github.com/fedora-infra/bodhi/blob/develop/bodhi/consumers/masher.py + + * This host relies on: + * db01 for its database, which is shares with the bodhi2 frontend nodes. + * An NFS mount of koji data in /mnt/koji/ + * The fedmsg bus for triggering mashes. + * XMLRPC calls to koji for tagging and untagging updates. + * bugzilla for posting comments about status changes + * the wiki for getting information about QA "Test Cases" + * taksotron (resultsdb) for getting status-check results (gating updates). + + * No other systems rely directly on this host. Everything depends on it + indirectly for the creation of new updates repos (which get synced out to + the master mirror for distribution. diff --git a/inventory/host_vars/bodhi-backend02.phx2.fedoraproject.org b/inventory/host_vars/bodhi-backend02.phx2.fedoraproject.org index 2727e60d0e..c731eb6a1c 100644 --- a/inventory/host_vars/bodhi-backend02.phx2.fedoraproject.org +++ b/inventory/host_vars/bodhi-backend02.phx2.fedoraproject.org @@ -8,3 +8,23 @@ volgroup: /dev/vg_bvirthost06 eth0_ip: 10.5.125.136 eth1_ip: 10.5.127.62 vmhost: bvirthost06.phx2.fedoraproject.org + + +# For the MOTD +csi_security_category: Low +csi_primary_contact: Bodhi Admins bodhiadmin-members@fedoraproject.org +csi_purpose: Run the Bodhi UpdatesHandler and other backend processes +csi_relationship: | + This host handles all of the bodhi backend stuff **except** for mashing. + https://github.com/fedora-infra/bodhi/blob/develop/bodhi/consumers/ + + * This host relies on: + * db01 for its database, which is shares with the bodhi2 frontend nodes. + * The fedmsg bus for triggering work. + * XMLRPC calls to koji for tagging and untagging updates. + * bugzilla for posting comments about status changes + * the wiki for getting information about QA "Test Cases" + + * No other systems rely directly on this host. Everything depends on it + indirectly for the creation of new updates repos (which get synced out to + the master mirror for distribution. diff --git a/roles/bodhi2/base/templates/updates_handler.py b/roles/bodhi2/base/templates/updates_handler.py index 255d3964e6..acc96c607d 100644 --- a/roles/bodhi2/base/templates/updates_handler.py +++ b/roles/bodhi2/base/templates/updates_handler.py @@ -1,6 +1,7 @@ config = dict( - # TODO -- we're thinking about moving this to bodhi-backend02 - {% if inventory_hostname.startswith('bodhi-backend01') %} + # Note, the masher runs on bodhi-backend01, but this + # runs on bodhi-backend02 (separation of concerns). + {% if inventory_hostname.startswith('bodhi-backend02') %} updates_handler=True, {% else %} updates_handler=False,