fix reducing noise on connectivity testing

This commit is contained in:
Trevor Batley 2023-10-02 12:30:42 +11:00
parent 6105acd0fd
commit ed1e6c762e
2 changed files with 7 additions and 4 deletions

View File

@ -51,7 +51,8 @@ fi
if [[ ! $KOJI_WEB_FQDN = $KOJI_HUB_FQDN ]] ; then if [[ ! $KOJI_WEB_FQDN = $KOJI_HUB_FQDN ]] ; then
# check that I can conmnect # check that I can conmnect
if [ ! nc -z $KOJI_WEB_FQDN 22 2>/dev/null ] ; then RESP=$(nc -z $KOJI_WEB_FQDN 22 2>&1 | grep succeeded)
if [[ -z $RESP ]] ; then
echo "I cannot connect to the web server at $KOJI_WEB_FQDN! Is it online? " echo "I cannot connect to the web server at $KOJI_WEB_FQDN! Is it online? "
echo "Options:" echo "Options:"
echo "- turn on the server" echo "- turn on the server"
@ -61,7 +62,8 @@ if [[ ! $KOJI_WEB_FQDN = $KOJI_HUB_FQDN ]] ; then
fi fi
for FQDN in ${KOJI_BUILD_FQDNS} ; do for FQDN in ${KOJI_BUILD_FQDNS} ; do
# check that I can conmnect # check that I can conmnect
if [ ! nc -z $FQDN 22 2>/dev/null ] ; then RESP=$(nc -z $FQDN 22 2>&1 | grep succeeded)
if [[ -z $RESP ]] ; then
echo "I cannot connect to builder at $FQDN! Is it online? " echo "I cannot connect to builder at $FQDN! Is it online? "
echo "Options:" echo "Options:"
echo "- turn on the server" echo "- turn on the server"
@ -156,7 +158,7 @@ if [[ $KOJI_WEB_FQDN = $KOJI_HUB_FQDN ]] ; then
else else
# deploy remotely to $KOJI_WEB_FQDN # deploy remotely to $KOJI_WEB_FQDN
# check that I can conmnect # check that I can conmnect
if [ ! nc -z $KOJI_WEB_FQDN 22 2>/dev/null ] ; then if [ ! nc -z $KOJI_WEB_FQDN 22 ] ; then
echo "I cannot connect to $KOJI_WEB_FQDN! Is it online? " echo "I cannot connect to $KOJI_WEB_FQDN! Is it online? "
echo "Options:" echo "Options:"
echo "- turn on the server" echo "- turn on the server"

View File

@ -50,7 +50,8 @@ if [ -z $KOJI_BUILD_FQDN ] ; then
KOJI_BUILD_FQDN=$KOJI_HUB_FQDN KOJI_BUILD_FQDN=$KOJI_HUB_FQDN
fi fi
if [ ! nc -z $KOJI_BUILD_FQDN 22 2>/dev/null ] ; then RESP=$(nc -z $KOJI_BUILD_FQDN 22 2>&1 | grep succeeded)
if [[ -z $RESP ]] ; then
echo "I cannot connect to $KOJI_BUILD_FQDN! Is it online? " echo "I cannot connect to $KOJI_BUILD_FQDN! Is it online? "
echo "Options:" echo "Options:"
echo "- turn on the server" echo "- turn on the server"