1
0
mirror of https://pagure.io/fedora-qa/os-autoinst-distri-fedora.git synced 2024-11-25 07:13:09 +00:00

Add a check that FreeIPA is actually up after upgrade

The FreeIPA upgrade test didn't actually check that FreeIPA is
actually running after the upgrade and reboot, it just kinda
assumed it is. Let's add a check to the start of the 'check'
test module that makes sure ipa.service actually comes up to
'active' state. This'll make it clearer when tests are failing
because FreeIPA didn't come up right after the upgrade. The
check will run on non-upgrade tests too, but that's fine.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2018-10-05 23:53:17 -07:00
parent 339623c56b
commit 6e262be28b

View File

@ -6,6 +6,18 @@ use mmapi;
sub run {
my $self = shift;
# make sure ipa.service actually came up successfully
my $count = 40;
while (1) {
$count -= 1;
die "Waited too long for ipa.service to show up!" if ($count == 0);
sleep 3;
# if it's active, we're done here
last unless script_run 'systemctl is-active ipa.service';
# if it's not...fail if it's failed
assert_script_run '! systemctl is-failed ipa.service';
# if we get here, it's activating, so loop around
}
# if this is an update, notify clients that we're now up again
mutex_create('server_upgraded') if get_var("UPGRADE");
# from here we branch: for F28 and earlier we use rolekit as