we really shouldn't always_run these, as they actually *do*
stuff. That does mean that in check mode we won't check if
database init and admin user creation are necessary, but these
are only ever necessary exactly one time at initial deployment
which is likely to be kicked off manually anyway, so it should
not be a problem. We adjust the 'when' condition for the 'wait
for services to start up' action, so it will work in check mode
with the 'services' variable undefined (because the step that
defines it now won't be run).
This puts in place the bits needed to use the new createhdds.py
for image generation, which works much nicer with ansible than
the old createhdds.sh. For now, the disk creation step is
disabled, because creating some images (including the ones that
get refreshed regularly) requires running VMs, and the openqa
server hosts are VMs themselves and do not currently have nested
virt enabled, so the creation would run extremely slow. Once we
get nested virt enabled, I'll change the condition for the image
creation step to what it should be. Until then I'll carry on
handling image creation manually (both hosts have all the images
at present anyhow).
basically, dump the config from the server before loading the
templates file, dump it after, and use json_diff to compare.
I wanted to make the actual template loading script from openQA
do some kind of check in '--clean' mode, but given how it's
designed that's not really terribly practical without doing
some major re-architecting, and this seems like a relatively
simple alternative. With this change, the actual "Load tests"
step will never show 'changed', but the subsequent 'Check if
the tests changed in previous step' step will show as changed
when appropriate.
I didn't do this originally because I was trying to make it
only show changed when something had really changed, but it was
too conservative - it wouldn't update when a test definition
changed, only when one was added. Doing it manually is a bit
annoying (you have to do the sed step and the ownership change)
so it's better to let you just re-run the play to update the
tests, even if it does mean getting the occasional spurious
changed state.
Turns out this was the reason why desktop HDD image generation
wasn't working: we need the XFS support bits for libguestfs or
else it can't resize the partitions.
So apparently hosts within infra can't reach dl.fp.o. This is a
problem as we have that host written in as a reliable repository
URL for a couple of openQA tests. infra hosts can reach dl.fp.o
by the name 'dl.phx2.fedoraproject.org', but nothing outside
infra can reach that hostname. So we don't just want to change
it in the openQA test git repo because we want that to work for
external deployments. So, let's just sed it on the fly for
the infra deployment...
this is needed for openID auth to work properly - otherwise
ipsilon thinks the request is coming from 'https://localhost'
and redirect after auth fails. openQA uses this config setting
for the openID base URL if it's set.
This comes from the kraxel.org repo and was added to the infra
repo by nirik. Note that it is technically non-freely licensed.
It contains a FAT implementation; Microsoft has granted an
exemption from the FAT patent purely for the purpose of
implementing a UEFI firmware, so there is a use restriction on
this code. License can be found (as I write this) at:
https://github.com/tianocore/edk2/blob/master/FatBinPkg/License.txt
Both 'server' and 'dispatcher' roles need to check out openqa_
fedora_tools, but only 'dispatcher' needs to install it. To
avoid having to register a variable in 'server' too and have
the install task check if either variable |changed, just have
two separate checkouts, so the dispatcher checkout will always
have 'changed' when appropriate.
it seems variables in vars/main.yml are 'role variables' with
a high precedence, while variables in defaults/main.yml are
'role default variables' with a low precedence. This could be
made a hell of a lot clearer in the docs.
This adds openQA server, worker and dispatcher roles, and
applies them to the appropriate hosts. A few secret vars are
required. See trac #4958 for discussion.