Commit Graph

88 Commits

Author SHA1 Message Date
Adam Williamson
faa8f6c27b openqa/worker: install packages used by tests
A recent test has a couple of perl deps, we need to ensure these
are installed on the worker hosts.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2021-06-18 08:56:17 -07:00
Adam Williamson
ca112a1922 openQA: update some branch names to 'main' not 'master'
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2021-06-01 13:39:02 -07:00
Adam Williamson
95f062c07a openQA: allow all workers NFS write access, other tweaks
The main goal of these changes is to allow all workers in each
deployment NFS write access to the factory share. This is because
I want to try using os-autoinst's at-job-run-time decompression
of disk images instead of openQA's at-asset-download-time
decompression; it avoids some awkwardness with the asset file
name, and should also actually allow us to drop the decompression
code from openQA I think.

I also rejigged various other things at the same time as they
kinda logically go together. It's mostly cleanups and tweaks to
group variables. I tried to handle more things explicitly with
variables, as it's better for use of these plays outside of
Fedora infra.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-11-05 16:10:32 -08:00
Adam Williamson
be8dc36f7f openqa/worker: sigh restarted not started
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-10-30 14:36:12 -07:00
Adam Williamson
c2023d5560 openQA: try to make NFS mount changes more robust
On client end, restart mount unit (with daemon-reload) if mount
file changes. On server end, run exportfs -r if export config
file changes.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-10-30 14:06:07 -07:00
Adam Williamson
13f59ad0eb openqa/worker: have swtpm service restart on success
This is because swtpm is designed not to be persistent, it's
sort of tied to a single "system" (VM in this case). We can't
expect an instance will stick around after it's been "used", it
doesn't do that, it exits successfully. So we need to restart it
when that happens.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-09-08 10:56:12 -07:00
Adam Williamson
a2bef634cf openqa/worker: use include_tasks not import_tasks
Using `when` with `import_tasks` doesn't actually skip the import
entirely, it just imports the tasks and skips them one by one.
Which reads oddly. `include_tasks` is properly dynamic so seems
better here.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-07-24 14:11:21 -07:00
Adam Williamson
d9f5530046 openqa/worker: configure to use 172. IP range not 10.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-07-23 17:27:19 -07:00
Adam Williamson
6b196e70ab openqa/worker: set up swtpm service on tap worker hosts
swtpm is a TPM emulator we want to use for testing Clevis on
IoT (and potentially other things in future). We're implementing
this by having os-autoinst just add the qemu args but expect
swtpm itself to be running already - that's counted as the
sysadmin's responsibility. My approach to this is to have openQA
tap worker hosts also be tpm worker hosts, meaning they run one
instance of swtpm per worker instance (as a systemd service) and
are added to a 'tpm' worker class which tests can use to ensure
they run on a suitably-equipped worker. This sets up all of that.
We need a custom SELinux policy module to allow systemd to run
swtpm - this is blocked by default.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-06-24 16:59:11 -07:00
Adam Williamson
be6a4937ea openqa/worker: revert br0 netmask
os-autoinst *really really* wants it to be this. The helper
service fails if it isn't.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-06-10 17:05:24 -07:00
Adam Williamson
e7e8fbd6d0 openqa/worker: ignore network.service start fail for now
It's failing on the new IAD worker and I can't figure out why.
Let's skip it for now just to get the plays run.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-06-10 12:56:09 -07:00
Adam Williamson
44434ee9fa openqa/worker: tighten netmask for br0 tap bridge
It shouldn't need anything but 10.0.2.*, and hopefully this will
stop it interfering with the rest of the infra network...

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-06-09 16:31:33 -07:00
Adam Williamson
a720ccac18 openqa/worker: correct scratchrepo cleanup filename
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-05-06 15:08:54 -07:00
Adam Williamson
1b87504450 openqa/worker: make createhdds git branch to use configurable
So we can test non-master branches on stg easier. May extend this
design to other repos (like the tests...) later.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-05-06 14:43:33 -07:00
Adam Williamson
c1adee3cb7 openqa: drop scratch builds, drop hack
Scratch builds are installed now and seem to be working, so on
their way to updates-testing, so we don't need to specify them
here any more. Also drop the hack I put in to get the service
restart handler run.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-04-30 17:03:32 -07:00
Adam Williamson
e9c96f5b4d openqa: really fix the worker service loop this time (I hope)
Thanks mackerman on Freenode...

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-04-30 15:43:26 -07:00
Adam Williamson
6566f6ba3f openqa/worker: try the |int fix for the loop here too
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-04-30 15:33:00 -07:00
Adam Williamson
d9d0048729 openqa/worker: abuse the scratch build stuff to trigger handler
I want this handler to run so I need to abuse something that's
gonna come up 'changed'.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-04-30 15:00:48 -07:00
Adam Williamson
c1b38b5ced openqa/worker: try and fix the service restart handler
It's failing and I don't see why, since I based this right on the
ansible docs. Maybe a |int will help?

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-04-30 15:00:48 -07:00
Adam Williamson
26005bf805 openqa: correct scratch repo config filename
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-04-30 12:38:48 -07:00
Adam Williamson
ba8c7b49ff openqa: create repodata for scratchrepo
Whoops.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-04-30 12:35:00 -07:00
Adam Williamson
bb1525bdef openqa/{server,worker}: enhance package handling
This provides a mechanism for deploying scratch builds, and also
for controlling whether or not to install openQA and os-autoinst
from updates-testing.

I have been doing the scratch build thing for years already, just
manually by ssh'ing into the boxes. This is getting tiring now
we have like 15 worker hosts.

The scratch build mechanism isn't properly idempotent, but fixing
that would be hard and I really only intend to use it transiently
when I'm updating the packages, so I don't think it's worth the
effort.

This also adds a notification for restarting openQA worker
services when the packages or config are updated, and fixes the
worker playbook to enable the last worker service.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-04-30 12:23:57 -07:00
Adam Williamson
22f9b422f6 openqa/worker: fix issues flagged by ansible-lint
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-04-29 17:46:29 -07:00
Adam Williamson
a6b9c5392d openqa/worker: disable aarch64-02 with a special worker class
openqa-aarch64-02.qa is broken in some very mysterious way:
https://pagure.io/fedora-infrastructure/issue/8750
until we can figure that out, this should prevent it picking up
normal jobs, but let us manually target a job at it whenever we
need to for debugging.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-04-24 21:34:26 +02:00
Adam Williamson
f26edfa7e7 openqa/worker: always install network-scripts
No need to conditionalize this any more, F29 is about to go EOL.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-04-24 21:34:14 +02:00
Adam Williamson
f29f9a38e5 openqa: update libsemanage python package names too
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-04-24 21:34:14 +02:00
Adam Williamson
b916a7cba6 openqa: update python selinux package name for Python 3
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2020-04-24 21:34:14 +02:00
Kevin Fenzi
81fb4582e7 ansible: change when conditions to use == instead of is when checking strings.
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2020-04-24 21:34:10 +02:00
Karsten Hopp
c9ed62ac32 update ansible_distribution_major_version conditionals
Signed-off-by: Karsten Hopp <karsten@redhat.com>
2020-04-24 21:34:10 +02:00
Adam Williamson
5759ecd1b6 openqa/worker: try and avoid failures in the NFS mount
I thought just having it WantedBy remote-fs.target should be
enough, but in fact this mount often fails on boot, and I forget
to check all the worker boxes until a bunch of tests fail and
everyone is sad. Let's try After=network-online.target and see
if that helps.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2019-06-15 09:11:40 -07:00
Paul W. Frields
7ef3be1d94 openqa: all roles change dnf -> package 2019-06-11 14:39:52 +00:00
Kevin Fenzi
4b31ac5152 ansible: Change all our group names from foo-bar to foo_bar or foo-bar-baz to foo_bar_baz
In ansible 2.8 the - character isn't supposed to be valid in group names.
While we could override this, might has well just bite the bullet and change it.
So, just switch all group names to use _ instead of -

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2019-05-20 17:38:09 +00:00
Peter Robinson
a3b174ccf7 aarch64: add edk2-arm UEFI firmware for oz/imagefactory/openqa for armhfp on aarch64 processes 2019-02-28 20:59:49 +00:00
Adam Williamson
5a902d0cca Make ifcfg change for openqa-ppc64le as well, and drop hack
Hopefully this bit in tap-setup.yml can now go away, as this
approach of using ansible_ifcfg_whitelist and _disabled does the
same thing in a cleaner way.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-12-15 10:06:54 -08:00
Adam Williamson
fb01e9ad79 openqa/worker: install network-scripts on F29+ tap workers
network.service isn't in initscripts any more.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-12-14 16:19:23 -08:00
Adam Williamson
c69c2fd485 openqa/relvalconsumer: fix all other dnf loop cases to use lists
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-10-09 13:50:39 -07:00
Adam Williamson
9a7dc2b145 openqa: Add libsemanage-python to worker createhdds packages
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-06-11 15:01:41 -07:00
Adam Williamson
543ffa4c20 openqa/worker: add withlock to packages needed for createhdds
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-05-28 17:09:49 -07:00
Adam Williamson
8b561f12a6 Correct a stray extra line in previous commit
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-05-09 15:12:07 -07:00
Adam Williamson
38a6abeae5 openqa_worker: install and enable rngd on some worker hosts
Some of the worker hosts have hardware RNGs (but not the x86_64
ones). Install rng-tools and enable rngd.service on these to
hopefully help with the Rawhide RNG issue.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-05-09 15:03:15 -07:00
Kevin Fenzi
a8714caab3 first cut at changing all the old |changed to is changed per ansible deprecations 2018-05-07 23:51:48 +00:00
Adam Williamson
f7c87b0f75 openqa/worker: make some file existence checks safer
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-03-06 15:24:37 -08:00
Paul Whalen
d05660192c Add aarch64 to workers template. 2018-03-06 09:47:01 +00:00
Paul Whalen
888c66f52e Add edk2-aarch64 to aarch64 workers. 2018-03-06 09:46:30 +00:00
Adam Williamson
fdecceb571 openqa: Fix a check in createhdds worker
Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-02-23 17:21:55 -08:00
Adam Williamson
672bf06b04 openqa: do createhdds on x86_64 workers for now
1539330 is turning out to be pretty intransigent and the images
are getting very old, plus we need f28 branched base images. So
let's do image builds on the x86_64 workers for now. Also re-
enable image builds on workers - I never should've turned that
off in the first place, as they shouldn't be susceptible to the
bug.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-02-23 17:14:28 -08:00
Adam Williamson
69ed1bb554 openqa: disable createhdds cron jobs (#1539330)
Yeah, daily crashes are bad.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2018-01-28 01:08:44 +01:00
Adam Williamson
3f284aed9e openqa/worker: run the ppc64 script hourly
The /dev/kvm permissions just seem to keep getting reset somehow
and I'm sick of it. Let's see if this helps.
2017-12-21 16:55:35 -08:00
Kevin Fenzi
afef097a3d switch all the include tasks to import tasks 2017-10-17 17:37:03 +00:00
Kevin Fenzi
a4ca0db30c more include cleanups 2017-10-15 20:22:53 +00:00