From 3e4c3534e5f2c0f961aa6d07b40226620515d766 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Nov 24 2021 18:59:01 +0000 Subject: openqa: switch FCOS scheduling to messages, reduce duplication This sets us up for scheduling FCOS tests from messages, not using a cron job. Also reduces some duplication of variables between openqa-servers-common and the dispatcher role defaults. Signed-off-by: Adam Williamson --- diff --git a/inventory/group_vars/openqa_servers_common b/inventory/group_vars/openqa_servers_common index 689c777..343c6a8 100644 --- a/inventory/group_vars/openqa_servers_common +++ b/inventory/group_vars/openqa_servers_common @@ -30,11 +30,10 @@ openqa_amqp_reporter_url: "amqps://openqa{{ openqa_env_suffix }}:@rabbitmq{{ ope # fedora-messaging resultsdb reporter settings openqa_amqp_resultsdb_reporter_queue: "openqa{{ openqa_env_suffix }}_resultsdb_reporter" openqa_amqp_resultsdb_reporter_routing_keys: ["org.fedoraproject.{{ deployment_type }}.openqa.job.done"] -openqa_amqp_scheduler_cacert: /etc/fedora-messaging/cacert.pem +# fedora-messaging scheduler settings (that differ from defaults) openqa_amqp_scheduler_cert: /etc/pki/fedora-messaging/openqa-cert.pem openqa_amqp_scheduler_key: /etc/pki/fedora-messaging/openqa-key.pem openqa_amqp_scheduler_queue: "openqa{{ openqa_env_suffix }}_scheduler" -openqa_amqp_scheduler_routing_keys: ["org.fedoraproject.prod.pungi.compose.status.change", "org.fedoraproject.prod.bodhi.update.request.testing", "org.fedoraproject.prod.bodhi.update.edit", "org.fedoraproject.prod.bodhi.update.status.testing.koji-build-group.build.complete"] # fedora-messaging job scheduler settings: most of these are the same # for prod and stg as they both must listen for prod messages. Only # the queue names differs diff --git a/roles/openqa/dispatcher/defaults/main.yml b/roles/openqa/dispatcher/defaults/main.yml index 2782b7f..2cbff99 100644 --- a/roles/openqa/dispatcher/defaults/main.yml +++ b/roles/openqa/dispatcher/defaults/main.yml @@ -8,8 +8,9 @@ openqa_amqp_scheduler_key: /etc/fedora-messaging/fedora-key.pem openqa_amqp_scheduler_cert: /etc/fedora-messaging/fedora-cert.pem openqa_amqp_scheduler_routing_keys: ["org.fedoraproject.prod.pungi.compose.status.change", "org.fedoraproject.prod.bodhi.update.request.testing", - "org.fedoraproject.prod.bodhi.update.edit"] - + "org.fedoraproject.prod.bodhi.update.edit", + "org.fedoraproject.prod.bodhi.update.status.testing.koji-build-group.build.complete", + "org.fedoraproject.prod.coreos.build.state.change"] openqa_amqp_reporter_url: "amqps://fedora:@rabbitmq.fedoraproject.org/%2Fpublic_pubsub" openqa_amqp_reporter_cacert: /etc/fedora-messaging/cacert.pem openqa_amqp_reporter_key: /etc/fedora-messaging/fedora-key.pem diff --git a/roles/openqa/dispatcher/files/schedule-fcos-builds.cron b/roles/openqa/dispatcher/files/schedule-fcos-builds.cron deleted file mode 100644 index aea0060..0000000 --- a/roles/openqa/dispatcher/files/schedule-fcos-builds.cron +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -# schedule openQA jobs for the current Fedora CoreOS builds in the -# various streams; if the current build has already been tested, -# this will not create any new jobs - -for stream in stable testing next; do /usr/local/bin/fedora-openqa fcosbuild --stream $stream > /dev/null 2>&1 || /usr/bin/true; done diff --git a/roles/openqa/dispatcher/tasks/main.yml b/roles/openqa/dispatcher/tasks/main.yml index 520a893..cc505ee 100644 --- a/roles/openqa/dispatcher/tasks/main.yml +++ b/roles/openqa/dispatcher/tasks/main.yml @@ -360,11 +360,6 @@ tags: - config -- name: Set up cron job to schedule Fedora CoreOS build jobs - copy: src=schedule-fcos-builds.cron dest=/etc/cron.hourly/schedule-fcos-builds owner=root group=root mode=0755 - tags: - - config - # This is to deal with an annoying bug in fedora-messaging: sometimes # consumers seem to get stuck allegedly running fine but not parsing # any messages. So we'll restart all running consumers every day just