Commit Graph

408 Commits

Author SHA1 Message Date
Adam Williamson
5561372a5f openqa/worker: drop edk2-arm package install
It no longer exists and we're no longer doing 32-bit ARM tests.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2025-05-07 10:39:33 -07:00
Adam Williamson
5da2faac67 openqa/server: allow OAuth2 authentication, enable on lab
OpenID support in FAS is going away. openQA has OAuth2 support.
I've tested this config to work with manual edits on lab, now
ansiblizing it (for lab only to start with).

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2025-03-28 13:40:57 -07:00
Michal Konecny
2ec055db6f Use first uppercase letter for all handlers
This will unify all the handlers to use first uppercase letter for
ansible-lint to stop complaining.

I went through all `notify:` occurrences and fixed them by running
```
set TEXT "text_to_replace"; set REPLACEMENT "replacement_text"; git grep
-rlz "$TEXT" . | xargs -0 sed -i "s/$TEXT/$REPLACEMENT/g"
```

Then I went through all the changes and removed the ones that wasn't
expected to be changed.

Fixes https://pagure.io/fedora-infrastructure/issue/12391

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2025-02-10 20:31:49 +00:00
Kevin Fenzi
6c38d7b61a various: fix some more shell variables that were accidentally converted to builtin.shell
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-01-15 17:26:50 -08:00
Ryan Lerch
47c68f478d ansiblelint fixes - fqcn[action-core] - template to ansible.builtin.template
Replaces references to template: with ansible.builtin.template

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:30:29 +10:00
Ryan Lerch
3c41882bb0 ansiblelint fixes - fqcn[action-core] - shell to ansible.builtin.shell
Replaces references to shell: with ansible.builtin.shell

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:29:10 +10:00
Ryan Lerch
25391e95b7 ansiblelint fixes - fqcn[action-core] - package to ansible.builtin.package
Replaces many references to  package: with ansible.builtin.package

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:28:00 +10:00
Ryan Lerch
462176464b ansiblelint fixes-- fqcn[action-core] - command to ansible.builtin.command
Replaces many references to  command: with ansible.builtin.command

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:26:47 +10:00
Ryan Lerch
6a3816dfdc ansiblelint fixes-- fqcn[action-core] - copy to ansible.builtin.copy
Replaces many references to 'copy' with ansible.builtin.copy

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 10:43:31 +10:00
Ryan Lerch
62952df107 ansiblelint fixes-- fqcn[action-core] - file to ansible.builtin.file
Replaces many references to  file: with ansible.builtin.file

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 10:41:52 +10:00
Ryan Lerch
691adee6ee Fix name[casing] ansible-lint issues
fix 1900 failures of the following case issue:

`name[casing]: All names should start with an uppercase letter.`

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-14 20:20:07 +10:00
Ryan Lerch
89f6f1fc32 Fix majority of remaining yamllint warnings and errors
Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2024-11-28 17:31:45 +10:00
Adam Williamson
4d801444a9 openqa: set up a side repo for prod as well as lab
Sometimes we want to deploy something to prod before it goes
stable (or even to u-t).

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-11-25 17:06:34 -08:00
Adam Williamson
1a537f38ce openqa/server: correct scratchrepo removal
d'oh. this has been broken for some time...

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-11-20 17:27:57 -08:00
Adam Williamson
cb026b4120 openqa/worker: kill stuck qemu processes daily
This is an awful hack to deal with
https://github.com/os-autoinst/os-autoinst/issues/2549 while we
try and fix it properly. This finds stuck qemu processes by
parsing the journal messages of the workers, and kills them.
workers stuck in the broken state should then recover on the
next checkin with the server. I tested this manually on all the
worker hosts and it...seemed to work, mostly. I'll keep an eye on
things after deploying it.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-10-15 13:13:42 -07:00
Adam Williamson
1325a7ab15 adamverse: add --no-deps to pip install commands
In various roles I maintain I use `python3 -m pip install` to
directly install a Python project (usually a fedora-messaging
consumer), to avoid the pointless bureaucracy of packaging them.
The roles install all the deps of these projects as packages
first, so pip doesn't have to install any deps, it only installs
the project itself. Well...that's the idea. It's possible for
this to go wrong (say I forget to update the roles when adding
a dep to the project), and in that case I think we'd rather have
things blow up (so I know something's wrong) than have pip
silently install some random upstream wheel system-wide to make
it work. The intent is that all the deps still come from proper
Fedora packages, only these projects themselves get installed
directly.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-09-20 11:10:09 -07:00
Adam Williamson
2dbf99e280 openqa/worker: bump load average threshold for big worker hosts
This is a new feature in openQA that prevents worker hosts
picking up new jobs if their load average is above a certain
threshold. It defaults to 40. Our big worker hosts tend to run
above this, so let's bump it on those.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-08-30 23:27:48 -07:00
Adam Williamson
4743c3fdce openqa/worker: transition all tap workers to NM-based setup
This seems to be working fine in testing, so let's deploy it
everywhere.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-07-25 14:54:03 -07:00
Adam Williamson
762b23ef7d openqa/worker tap-setup-nm: tweak some quoting, drop tunctl
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-07-25 14:06:52 -07:00
Adam Williamson
690a5eb951 openqa/worker: add NM-based tap setup and test on p09-worker01
network-scripts-openvswitch was removed in f40 and network-scripts
is going away in f41; we really need to get off using them.
This attempts to implement the same setup using NetworkManager,
based on a few different NM/ovs references, and the source of
openQA upstream's os-autoinst-setup-multi-machine . It might
need a bit of tweaking, so for now, we make it a separate task
and use it only on p09-worker01 for testing. This doesn't handle
tearing down the old network-scripts-based config as that's
pretty complex and will only need to happen once; I'll do it
manually before trying this out.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-07-25 13:50:39 -07:00
Adam Williamson
7f73f1253e openqa/worker: don't explicitly pull in ffmpeg-free on aarch64
We don't want it there - see earlier commits - but I didn't
notice it's actually explicitly listed here for all arches,
which breaks stuff on aarch64 now we told dnf to exclude it.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-06-11 11:08:36 -07:00
Adam Williamson
44c5c79ad7 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 <awilliam@redhat.com>
2024-05-27 15:25:25 -07:00
Adam Williamson
826fd32330 openqa/worker: don't force createhdds off non-standard branch
Using the same approach as we do for the tests and fedora_openqa.
I wish I'd done this *before* I ran the playbook on lab and it
wiped every...single...goddamn...disk image.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-03-26 15:35:33 -07:00
Adam Williamson
7cfe3d61e6 openqa/worker: block ffmpeg-free on aarch64
Encoding with ffmpeg rather than os-autoinst's built-in encoder
gives us less broken videos, but on aarch64 it seems to cause
problems, especially on stg's old, busted worker hosts - I think
it's more CPU-intensive and they just can't handle the load. So,
let's block it.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-03-26 15:07:27 -07:00
Adam Williamson
da391c4ba2 openQA: trim default routing keys for scheduler consumer
With Bodhi 8 we no longer need to listen to request.testing or
update.edit messages. Yay.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-02-09 12:25:55 -08:00
Adam Williamson
d3b6d1bafd openqa/worker: install ffmpeg-free
I'm adding this as a Recommends: for os-autoinst, but want to
get it on the workers now. Having it installed gives us better
videos of test runs (the internal video encoder is a bit wonky
and produces videos that have errors which make jumping around
within the video not work properly).

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2024-01-03 10:38:11 -08:00
Adam Williamson
1cb0c0cdc6 Put openqa-lab-repo.repo in worker role as well as server role
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-10-27 18:09:24 -07:00
Adam Williamson
504b8217d3 openqa etc.: use pip for local installs, not setuptools
On Fedora 39, we ran into an issue with setuptools that isn't
immediately resolvable:
https://github.com/pypa/setuptools/issues/3797#issuecomment-1783613895
using pip like this seems to avoid it.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-10-27 17:23:53 -07:00
Adam Williamson
530f69d967 openqa: use an external side repo for test builds
It's overall simpler and more idempotent to just use a side repo
maintained outside of ansible than re-create one on each system
on each run of the plays.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-10-27 11:20:58 -07:00
Adam Williamson
374956365e openqa: drop the results_min_free_disk_space_percentage cleanup
It is extremely slow to run, and we figured out that the problem
on openqa01 was excessive space being used by Netapp snapshots,
so we don't need this any more. It was actually deleting old
jobs before their time, because it had already wiped every
video file and didn't know what else to do...

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-07-25 15:13:07 -07:00
Adam Williamson
1e26a28c2c openqa/server: try setting a limit on test result disk usage
We're having issues with test results eating up all the disk
space we can throw at them (prod is over 4T, stg is over 2T -
I don't know why prod is bigger, that's odd, but it may be an
odd effect of having more arches on stg, maybe aarch64 and
ppc64le tests generally have smaller videos, or something).
This config setting should make openQA keep the space usage
on the partition at a max of 85%, by deleting videos from older
tests as required.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-07-21 10:19:54 -07:00
Adam Williamson
a5c322b4ee More cleanup on the openQA AMQP stuff
nirik and I went around and around a bit today and ended up back
where we started, but with a clearer understanding of where that
this. This explains it a bit better, and makes what's actually
going on in various places clearer with the use of appropriate
shared variables. This should not actually *change* anything at
all when deployed.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2023-06-22 23:21:28 +02:00
Adam Williamson
de979123fa openQA: don't install the fedoraupdaterestart plugin any more
We don't need it, we use upstream RETRY now.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-12-19 16:16:11 -08:00
Adam Williamson
f1e0e0d037 Fix openqa_tap truthiness checks
Sigh, |bool doesn't do what you might think it does:
https://medium.com/opsops/wft-bool-filter-in-ansible-e7e2fd7a148f

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-11-25 14:58:36 -08:00
Adam Williamson
28110d34be openqa/worker: prepare to handle multiple tap worker classes
I'm going to try splitting the tap jobs across multiple worker
hosts. We have quite a lot of tap jobs, now, and I have seen
sometimes a situation where all non-tap jobs have been run and
the non-tap worker hosts are sitting idle, but the single tap
worker host has a long queue of tap jobs to get through.

We can't just put multiple hosts per instance into the tap
class, because then we might get a case where job A from a tap
group is run on one host and job B from a tap group is run on
a different host, and they can't communicate. It's actually
possible to set this up so it works, but it needs yet more
complex networking stuff I don't want to mess with. So instead
I'm just gonna split the tap job groups across two classes,
'tap' and 'tap2'. That way we can have one 'tap' worker host
and one 'tap2' worker host per instance and arch, and they will
each get about half the tap jobs.

Unfortunately since we only have one aarch64 worker for lab it
will still have to run all the jobs, but for all other cases we
do have at least two workers, so we can split the load.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-11-25 14:11:58 -08:00
Adam Williamson
1c95ec9a35 Revert "openQA: set higher LimitRequestLine in httpd vhost config"
This reverts commit 892453da7e.
openQA still had problems with the very long request, so I just
did an ugly hack to get the request under the limit instead.
2022-10-21 17:12:15 -07:00
Adam Williamson
892453da7e openQA: set higher LimitRequestLine in httpd vhost config
The openQA job scheduler was hitting 414 errors today because
an update has so many builds there are more than 8190 characters
(the default limit) in the POST request. Let's bump the limit
to 16000.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-10-21 08:38:05 -07:00
Adam Williamson
f122367c34 openqa/worker: change name on kernel override config file
It really needs to be called exactly 60-block-scheduler.rules
as it's overriding a file of the same name in `/usr`.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-08-17 14:28:18 -04:00
Adam Williamson
ca8e3db401 Add file missed from previous commit
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-08-17 13:46:16 -04:00
Adam Williamson
5b49611201 openqa/worker: override kernel scheduler config
This applies only within Fedora infra for now, as we're not sure
whether worker hosts on different hardware hit this bug. It's
intended to work around:
https://bugzilla.redhat.com/show_bug.cgi?id=2009585
a bug which results in the infra worker hosts hanging after a
short time when running kernels newer than 5.11.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-08-17 13:34:15 -04:00
Adam Williamson
8e891fe4d5 openqa/server: update for git default branch rename
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-07-14 11:58:09 -07:00
Adam Williamson
7ba67fdc12 openQA: don't enable FedoraUpdateRestart plugin
Upstream implemented a feature that we can use to do the same
thing using just a test variable, so we're switching to that.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-07-06 10:42:26 -07:00
Adam Williamson
a91dfc29e9 openqa: twiddle with the delegation stuff again
Ugh, we delegate for the assetsize stuff too and there's tons of
that, splitting it would be awful. Let's try a different approach
with a new optional variable for the delegate target.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-06-07 16:32:04 -07:00
Adam Williamson
42e930e97f openqa-onebox: tweak db host stuff
Using the machine's own hostname works for the ansible delegate
stuff but doesn't work for openQA itself (if you try and access
the DB by hostname like this, postgres denies access; you have
to use 'localhost' for postgres to allow it). Using 'localhost'
works for postgres but doesn't do the right thing for delegation.
Let's use 'localhost' and split the two play steps into
delegated and non-delegated versions.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-06-07 16:17:29 -07:00
Adam Williamson
d227dac859 openqa/dispatcher: don't require resultsdb and wiki URL/hostname
The config file should treat these as optional, not every openQA
instance wants to report results.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-06-07 15:21:15 -07:00
Adam Williamson
4fd83483fa openqa/dispatcher: comment on the needed packages
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-06-07 15:21:15 -07:00
Adam Williamson
ccf3b23cd4 openqa/server: skip openqa.ini amqp section if vars not set
We don't want to include this section if the vars aren't set.
Not every openQA server has to be an AMQP publisher.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-06-07 15:21:15 -07:00
Adam Williamson
6c2991306c openqa/server: only install nfs-utils when needed
If there are no NFS workers, we don't need the NFS server.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-06-07 15:21:15 -07:00
Adam Williamson
0cf8a59fd5 openqa: fix openqa_nfs_{worker,client}s confusion again
Missed from previous commit.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-06-07 13:26:22 -07:00
Adam Williamson
e5c5cc336f openqa: fix confusion between openqa_nfs_{worker,client}s
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-06-07 13:26:01 -07:00