koji hub: re-enable gc jobs, disable session cleanup on db-koji01

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2020-06-11 12:08:59 -07:00
parent 29e9d7a4bb
commit ab7d661781
3 changed files with 38 additions and 35 deletions

View file

@ -43,86 +43,78 @@
owner_user: apache owner_user: apache
host: "koji{{env_suffix}}.fedoraproject.org" host: "koji{{env_suffix}}.fedoraproject.org"
- { role: nfs/server, when: env == "staging" } - { role: nfs/server, when: env == "staging" }
- { role: keepalived, when: env == "production" and inventory_hostname.startswith('koji') and datacenter == 'phx2' }
# production nfs mounts from netapp
- role: nfs/client - role: nfs/client
mnt_dir: '/mnt/fedora_koji' mnt_dir: '/mnt/fedora_koji'
nfs_src_dir: 'fedora_koji' nfs_src_dir: 'fedora_koji'
when: env == 'production' and inventory_hostname.startswith('koji') when: env == 'production' and inventory_hostname.startswith('koji')
- role: nfs/client - role: nfs/client
mnt_dir: '/mnt/fedora_koji/koji/vol/fedora_koji_archive00' mnt_dir: '/mnt/fedora_koji/koji/vol/fedora_koji_archive00'
nfs_src_dir: 'fedora_koji_archive00' nfs_src_dir: 'fedora_koji_archive00'
when: env == 'production' and inventory_hostname.startswith('koji') when: env == 'production' and inventory_hostname.startswith('koji')
- role: nfs/client - role: nfs/client
mnt_dir: '/mnt/fedora_koji/koji/vol/fedora_koji_archive01' mnt_dir: '/mnt/fedora_koji/koji/vol/fedora_koji_archive01'
nfs_src_dir: 'fedora_koji_archive01' nfs_src_dir: 'fedora_koji_archive01'
when: env == 'production' and inventory_hostname.startswith('koji') when: env == 'production' and inventory_hostname.startswith('koji')
- role: nfs/client - role: nfs/client
mnt_dir: '/mnt/fedora_koji/koji/vol/fedora_koji_archive02' mnt_dir: '/mnt/fedora_koji/koji/vol/fedora_koji_archive02'
nfs_src_dir: 'fedora_koji_archive02' nfs_src_dir: 'fedora_koji_archive02'
when: env == 'production' and inventory_hostname.startswith('koji') when: env == 'production' and inventory_hostname.startswith('koji')
- role: nfs/client - role: nfs/client
mnt_dir: '/mnt/fedora_koji/koji/vol/fedora_koji_archive03' mnt_dir: '/mnt/fedora_koji/koji/vol/fedora_koji_archive03'
nfs_src_dir: 'fedora_koji_archive03' nfs_src_dir: 'fedora_koji_archive03'
when: env == 'production' and inventory_hostname.startswith('koji') when: env == 'production' and inventory_hostname.startswith('koji')
- role: nfs/client - role: nfs/client
mnt_dir: '/mnt/fedora_koji/koji/vol/fedora_koji_archive04' mnt_dir: '/mnt/fedora_koji/koji/vol/fedora_koji_archive04'
nfs_src_dir: 'fedora_koji_archive04' nfs_src_dir: 'fedora_koji_archive04'
when: env == 'production' and inventory_hostname.startswith('koji') when: env == 'production' and inventory_hostname.startswith('koji')
- role: nfs/client - role: nfs/client
mnt_dir: '/mnt/fedora_koji/koji/vol/fedora_koji_archive05' mnt_dir: '/mnt/fedora_koji/koji/vol/fedora_koji_archive05'
nfs_src_dir: 'fedora_koji_archive05' nfs_src_dir: 'fedora_koji_archive05'
when: env == 'production' and inventory_hostname.startswith('koji') when: env == 'production' and inventory_hostname.startswith('koji')
- role: nfs/client - role: nfs/client
mnt_dir: '/mnt/koji' mnt_dir: '/mnt/koji/ostree'
nfs_src_dir: 'fedora_s390/data' nfs_src_dir: 'fedora_ostree_content/ostree'
when: env == 'production' and inventory_hostname.startswith('s390') mount_stg: true
when: env != 'staging'
- role: nfs/client - role: nfs/client
mnt_dir: '/mnt/koji' mnt_dir: '/mnt/koji/compose/ostree'
nfs_src_dir: 'fedora_ppc/data' mount_stg: true
when: env == 'production' and inventory_hostname.startswith('ppc') nfs_src_dir: 'fedora_ostree_content/compose/ostree'
when: env != 'staging'
- role: nfs/client - role: nfs/client
mnt_dir: '/mnt/koji' mnt_dir: '/srv/odcs'
nfs_src_dir: 'fedora_arm/data' nfs_src_dir: 'fedora_odcs'
when: env == 'production' and inventory_hostname.startswith('arm') when: env != 'staging'
# In staging, we mount fedora_koji as read only (see nfs_mount_opts) # In staging, we mount fedora_koji as read only (see nfs_mount_opts)
- role: nfs/client - role: nfs/client
mnt_dir: '/mnt/fedora_koji_prod' mnt_dir: '/mnt/fedora_koji_prod'
nfs_src_dir: 'fedora_koji' nfs_src_dir: 'fedora_koji'
when: env == 'staging' and inventory_hostname.startswith('koji') when: env == 'staging' and inventory_hostname.startswith('koji')
- role: nfs/client
mnt_dir: '/mnt/koji/ostree'
nfs_src_dir: 'fedora_ostree_content/ostree'
mount_stg: true
when: env != 'staging' and datacenter == 'phx2'
- role: nfs/client
mnt_dir: '/mnt/koji/compose/ostree'
mount_stg: true
nfs_src_dir: 'fedora_ostree_content/compose/ostree'
when: env != 'staging' and datacenter == 'phx2'
- role: nfs/client
mnt_dir: '/mnt/koji/ostree'
nfs_src_dir: 'fedora_ostree_content/ostree'
mount_stg: true
when: env != 'staging' and datacenter == 'iad2'
- role: nfs/client
mnt_dir: '/mnt/koji/compose/ostree'
mount_stg: true
nfs_src_dir: 'fedora_ostree_content/compose/ostree'
when: env != 'staging' and datacenter == 'iad2'
- role: nfs/client - role: nfs/client
mnt_dir: '/mnt/koji/ostree' mnt_dir: '/mnt/koji/ostree'
nfs_src_dir: 'fedora_ostree_content/ostree' nfs_src_dir: 'fedora_ostree_content/ostree'
mount_stg: true mount_stg: true
when: env == 'staging' when: env == 'staging'
- role: nfs/client - role: nfs/client
mnt_dir: '/mnt/koji/compose/ostree' mnt_dir: '/mnt/koji/compose/ostree'
mount_stg: true mount_stg: true
nfs_src_dir: 'fedora_ostree_content/compose/ostree' nfs_src_dir: 'fedora_ostree_content/compose/ostree'
when: env == 'staging' when: env == 'staging'
- role: nfs/client
mnt_dir: '/srv/odcs'
nfs_src_dir: 'fedora_odcs'
when: env != 'staging'
- sudo - sudo
- role: rabbit/user - role: rabbit/user
username: "koji{{ env_suffix }}" username: "koji{{ env_suffix }}"

View file

@ -429,7 +429,7 @@
tags: tags:
- koji_hub - koji_hub
- name: install cron jobs to be used by keepalived later - name: install cron jobs in /usr/local/etc/
copy: src={{ item }} dest=/usr/local/etc/{{ item }} copy: src={{ item }} dest=/usr/local/etc/{{ item }}
with_items: with_items:
- koji-directory-cleanup - koji-directory-cleanup
@ -439,6 +439,16 @@
- files - files
- koji_hub - koji_hub
- name: enable crons on koji02 normally.
copy: src={{ item }} dest=/etc/cron.d/{{ item }}
with_items:
- koji-directory-cleanup
- koji-gc
- koji-prune-signed-copies
tags:
- files
when: env != 'staging' and ansible_hostname.startswith('koji02')
- name: Create shadow user - name: Create shadow user
user: name=koji_shadow user: name=koji_shadow
when: "fedmsg_koji_instance != 'primary'" when: "fedmsg_koji_instance != 'primary'"

View file

@ -154,6 +154,7 @@
copy: > copy: >
src=koji-cleanup-sessions.cron src=koji-cleanup-sessions.cron
dest=/etc/cron.d/koji-cleanup-sessions.cron dest=/etc/cron.d/koji-cleanup-sessions.cron
state=absent
when: inventory_hostname.startswith('db-koji01') when: inventory_hostname.startswith('db-koji01')
tags: tags:
- cron - cron