From 44c5c79ad7d177e7b69798fab7139d42e7254252 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: May 27 2024 22:25:25 +0000 Subject: openqa/dispatcher: add a cron job to send missed test results This works around an annoying problem where, for some reason, we sometimes just miss sending completed test results to resultsdb. I've never been able to figure out why this happens, but this should band-aid it by looking, daily, for updates stuck in waiting gating status, checking for cases where a test finished but we didn't send a result, and sending it. Signed-off-by: Adam Williamson --- diff --git a/roles/openqa/dispatcher/files/report-blocked.cron b/roles/openqa/dispatcher/files/report-blocked.cron new file mode 100644 index 0000000..b6807b4 --- /dev/null +++ b/roles/openqa/dispatcher/files/report-blocked.cron @@ -0,0 +1,6 @@ +#!/bin/sh + +# find 'blocked' updates where a test completed but for some reason we +# did not submit the result to resultsdb, and submit it + +/usr/local/bin/fedora-openqa blocked --report diff --git a/roles/openqa/dispatcher/tasks/main.yml b/roles/openqa/dispatcher/tasks/main.yml index f7e5049..f86bc04 100644 --- a/roles/openqa/dispatcher/tasks/main.yml +++ b/roles/openqa/dispatcher/tasks/main.yml @@ -377,3 +377,10 @@ copy: src=restart-consumers.cron dest=/etc/cron.daily/restart-consumers owner=root group=root mode=0755 tags: - config + +# This papers over the weird problem that we occasionally just fail +# to report a completed test to resultsdb, which can cause updates +# to get blocked. the subcommand tries to find such cases and send +# the missing reports +- name: Set up cron job to find and submit missing results to resultsdb + copy: src=report-blocked.cron dest=/etc/cron.daily/report-blocked owner=root group=root mode=0755