903388 - fix service-wait script #1836

Merged
merged 1 commit into from Apr 3, 2013

2 participants

@iNecas
Katello Project member

wget was not recovering from 'Unable to establish SSL connection.' type of
errors. That caused the script exited with success although the service was
not ready yet (the sleep timeout set for 5 seconds was not enough).

The fix is to use curl to double check the response for test url (curl is able
to retry form SSL issues).

Also the script exists with non-zero when the test url can't be reached: when
the script succeeds after start, we want to be sure that the service is really
up and running. Otherwise it should fail.

The curl fix should also make the sleep $ADDITIONAL_TIME useless (as this
was probably meant to fix the original issue with SSL). Removing, to eliminate
magic constants and speed up the script a bit.

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=903388

@lzap

You will maybe require Require: curl in katello.spec ACK

@iNecas iNecas 903388 - fix service-wait script
wget was not recovering from 'Unable to establish SSL connection.'
type of errors. That caused the script exited with success although
the service was not ready yet (the sleep timeout set for 5 seconds was
not enough).

The fix is to use curl to double check the response for test url (curl is
able to retry form SSL issues).

Also the script exists with non-zero when the test url can't be
reached: when the script succeeds after start, we want to be sure that
the service is really up and running. Otherwise it should fail.

The curl fix should also make the `sleep $ADDITIONAL_TIME` useless (as
this was probably meant to fix the original issue with SSL). Removing,
to eliminate magic constants and speed up the script a bit.
6bdc987
@iNecas
Katello Project member

Good idea, added curl, as well as wget.

@iNecas iNecas merged commit 0e53792 into Katello:master Apr 3, 2013
@lzap
@iNecas
Katello Project member

I know about this, but since the script is part of katello-common, the deps should go there anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment