add a base_selinux test (follow-on from default_install)
ClosedPublic

Authored by adamwill on Dec 17 2015, 5:17 AM.

Details

Summary

so here's our first attempt to use the 'carry on from a previous
test' stuff! This adds a base_selinux test that uses a disk
image from a previous default_install run, and adds jobtemplates
to run base_selinux for appropriate products: generic_boot
(for nightly tests), server_dvd, and workstation_live. Note that
you'll want to either update to the newest openQA package I just
built in COPR or create /var/lib/openqa/share/factory/tmp owned
by geekotest; openQA tries to use that directory as MOJO_TMPDIR
but in 4.2, if the directory doesn't exist, it doesn't create it,
and we wind up with the default MOJO_TMPDIR which is /tmp; when
the disk image is uploaded it creates a huge temp file in /tmp
and may well exhaust the available space as it's a tmpfs. I've
backported a recent upstream commit that tries to create the
directory if it doesn't exist, in 4.2-10.

It seems like openQA is smart enough to figure out the
dependencies correctly, so the 'base_selinux' test for each
product depends on the 'default_install' test for the same
product (not any of the other default_install runs) and will
use the hard disk image it produces.

Test Plan

Do a full test run and make sure base_selinux tests
appear for appropriate products, depend on the correct default_
install test, the default_install test uploads the hard disk
image correctly, and the base_selinux test runs correctly. And
of course that nothing else broke in the process...

Diff Detail

Repository
rOPENQATESTS os-autoinst-distri-fedora
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
adamwill retitled this revision from to add a base_selinux test (follow-on from default_install).Dec 17 2015, 5:17 AM
adamwill updated this object.
adamwill edited the test plan for this revision. (Show Details)
adamwill added reviewers: jskladan, garretraziel.
jskladan accepted this revision.Dec 17 2015, 7:41 AM
This revision is now accepted and ready to land.Dec 17 2015, 7:41 AM

I can't review this - after upgrading to version 4.2-10, openQA doesn't work. It stops completely responding after a while - it stops updating window or log and it also doesn't respond to canceling this job. I will try to investigate further.

garretraziel added a comment.EditedDec 17 2015, 1:45 PM

It looks like it's problem with disk uploading. Test actually freezes during saving HDD (at the end of default_install test), then it shows something along the lines of "hdd_1 upload failed" - during HDD uploading, my computer is REALLY unresponsive, so I couldn't really copy that message, test failed (but it shows as if all steps passed in WebUI) and got copied to new job and for some reason, old autoinst-log.txt gets deleted every time this happens.

In /var/log/openqa, there is: [Thu Dec 17 14:38:25 2015] [error] Worker 5678 has no heartbeat, restarting. I will try to investigate further. Either way, if this works for you, code looks OK, so feel free to merge this.

adamwill added a comment.EditedDec 17 2015, 4:44 PM

That's quite similar to what I saw with the /tmp problem - check if there's any huge files in /tmp and it's at 100% capacity, check if /var/lib/openqa/factory/tmp exists...

I tested on openqa.happyassassin.net and it seemed OK after I created the required dir manually, but I'll check this out on staging before I merge it to develop and send it to prod.

I tested it out on staging and it worked fine, so I've landed it and sent it to both staging and production properly. It worked fine on prod too. Your problem might be that you need to restart openqa-webui.service? I had to do that manually on prod after the package update to make it work right.

Yes, it was caused by missing tmp/. Problem was little less apparent - I updated openQA and restarted all its services, but I am using bindfs to mount directory from my home to /var/lib/openqa/share/factory (so I could run downloader as normal user and also so I wouldn't have all files downloaded to my root partition) and it didn't automatically create tmp directory on it and used /tmp instead. Anyway, it works OK.