Description of problem: Timeout of the registration to RHN Satellite(9m+) is more than expected(90s) Version-Release number of selected component (if applicable): Red Hat Enterprise Virtualization Hypervisor release 5.6 (6.1.el5) How reproducible: always Steps to Reproduce: 1. insert a new rule in iptables to drop all https packages. #iptables -I OUTPUT -p tcp --dport 443 -j DROP 2. register the host to an existed RHN satellite 3. as designed, the function will not succeed because it is using https to register. Actual results: Timeout after more than 9 minutes Expected results: Timeout after 90 seconds Additional info: My suggestion in line 59 of /usr/libexec/ovirt-config-rhn: "if wget -q -r -nd --no-check-certificate --timeout=90 -O $location $CaCert; then" the wget will retry 20 time by default, and 90s each. so it will work as design with adding one more option "tries"here: Such as "if wget -q -r -nd --no-check-certificate --timeout=90 --tries=1 -O $location $CaCert; then"
Thanks for catching this! BTW, from your suggestion looks like you actually have a patch, feel free to post it here :)
Created attachment 473890 [details] Patch Updated patch -- changes to 30 seconds, 3 tries Also handles issue with wget not returning valid error code Testing: went through the same steps as in the bug description. Also manually tested error condition change if [ -e $location -a ! "$(ll $location 2>/dev/null | awk '{print $5}')" = "0" ]; then echo "Success"; else echo "Failed"; fi # location=/tmp/testing # rm $location # run if from above --> Failed (does not exist) # touch #location # run if from above --> Failed (exists, but 0 size) # echo "test" > $location # run if from above --> Success (exists, non-zero)
Verified on rhevh 5.7-1: Downloading Satellite CA cert..... From: https://10.66.73.127/pub/RHN-ORG-TRUSTED-SSL-CERT To: /etc/sysconfig/rhn/RHN-ORG-TRUSTED-SSL-CERT File already persisted: /etc/sysconfig/rhn/RHN-ORG-TRUSTED-SSL-CERT Registering to RHN account..... Warning: yum-rhn-plugin is not present, could not enable it.File already persisted: /etc/sysconfig/rhn/up2date File persisted Successfully persisted /etc/sysconfig/rhn/systemid System sucessfuly registered https://10.66.73.127 Could see register to rhn satellite is successful.
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHSA-2011-1090.html