add a cockpit realmd FreeIPA join test
ClosedPublic

Authored by adamwill on Jun 3 2016, 6:20 AM.

Details

Summary

This requires a few other changes:

  • turn clone_host_resolv into clone_host_file, letting you clone any given host file (cloning /etc/hosts seems to make both server deployment and client enrolment faster/more reliable)
  • allow loading of multiple POSTINSTALL tests (so we can share the freeipa_client_postinstall test). Note this is compatible, existing uses will work fine
  • move initial password change for the IPA test users into the server deployment test (so the client tests don't conflict over doing that)
  • add GRUB_POSTINSTALL, for specifying boot parameters for boot of the installed system, and make it work by tweaking _console_wait _login (doesn't work for _graphical_wait_login yet, as I didn't need that)
  • make the static networking config for tap tests into a library function so the tests can share it
  • handle ABRT problem dirs showing up in /var/spool/abrt as well as /var/tmp/abrt (because the enrol attempt hits #1330766 and the crash report shows up in /var/spool/abrt, don't ask me why the difference, I just work here)
  • specify the DNS servers from the worker host's resolv.conf as the forwarders for the FreeIPA server when deploying it; if we don't do this, rolekit defaults to using the root servers as forwarders(!) and thus we get the public, not phx2-appropriate, results for e.g. mirrors.fedoraproject.org, some of which the workers can't reach, so PackageKit package install always fails (boy, was it fun figuring THAT mess out)

Even after all that, the test still doesn't actually pass, but
I'm reasonably confident this is because it's hitting actual bugs,
not because it's broken. It runs into #1330766 nearly every time
(I think I saw *one* time the enrolment actually succeeded), and
seems to run into a subsequent bug I hadn't seen before when
trying to work around that by trying the join again (see
https://bugzilla.redhat.com/show_bug.cgi?id=1330766#c37 ).

Test Plan

Run the test, see what happens. If you're really lucky,
it'll actually pass. But you'll probably run into #1330766#c37,
I'm mostly posting for comment. You'll need a tap-capable openQA
instance to test this.

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 cockpit realmd FreeIPA join test.Jun 3 2016, 6:20 AM
adamwill updated this object.
adamwill edited the test plan for this revision. (Show Details)
adamwill added reviewers: jskladan, garretraziel.
adamwill updated this revision to Diff 2255.Jun 3 2016, 4:22 PM

add a missing file

adamwill updated this revision to Diff 2256.Jun 3 2016, 10:32 PM

cleanups and fixes

various tweaks and fixes to actually make the test pass! We
install the realmd update that actually fixes the bug we kept
running into (this is just a temporary measure to demonstrate
the test actually working), drop the attempted workaround for
said bug, and read the hostname for freeipa_client_postinstall
from the system-under-test instead of hardcoding it (since
it's different between the two test suites that now use it).
We also wait_still_screen after quitting firefox to give X
time to shutdown; we could also do this with some kinda
needle or just switch to an unused VT, but I think
wait_still_screen is the slightly better choice.

garretraziel accepted this revision.Jun 7 2016, 1:28 PM

For some reason, I cannot get this test to run - tests are scheduled, workers are idle, but it doesn't start. But code looks good I guess and if it works on staging...

tests/_console_wait_login.pm
15

Maybe convert this to that weird dict-like "named arguments" thing? WDYT?

This revision is now accepted and ready to land.Jun 7 2016, 1:28 PM

For some reason, I cannot get this test to run - tests are scheduled, workers are idle, but it doesn't start. But code looks good I guess and if it works on staging...

Did you by any chance cancel some of the 'non-relevant' tests before they started to try and save time? I saw the same problem a couple of times when I did that, I think it somehow confused the scheduler...I didn't look into it in detail. Restarting this test should make it work, IIRC.

tests/_console_wait_login.pm
15

You mean a hash? :P Yeah, that probably makes sense, I was just too lazy. I'll do that.

This revision was automatically updated to reflect the committed changes.

OK, I changed do_bootloader to take an arg hash, dropped the temporary realmd direct update bit as it's no longer needed (and in fact was breaking things), tested it - https://openqa.stg.fedoraproject.org/tests/overview?build=Fedora-24-20160607.n.0-IPAPIT&version=24&groupid=1&distri=fedora - and merged.