Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 664378 - Timeout of the registration to RHN Satellite is more than expected
Timeout of the registration to RHN Satellite is more than expected
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: ovirt-node (Show other bugs)
5.6
All Linux
urgent Severity medium
: rc
: ---
Assigned To: Mike Burns
Virtualization Bugs
: ZStream
Depends On:
Blocks: 670315
  Show dependency treegraph
 
Reported: 2010-12-20 03:37 EST by Linqing Lu
Modified: 2013-04-30 18:46 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 670241 (view as bug list)
Environment:
Last Closed: 2011-07-27 10:41:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch (1.36 KB, patch)
2011-01-17 11:38 EST, Mike Burns
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1090 normal SHIPPED_LIVE Moderate: rhev-hypervisor security and bug fix update 2011-07-27 10:40:56 EDT

  None (edit)
Description Linqing Lu 2010-12-20 03:37:54 EST
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"
Comment 1 Alan Pevec 2010-12-20 06:05:05 EST
Thanks for catching this!
BTW, from your suggestion looks like you actually have a patch,
feel free to post it here :)
Comment 3 Mike Burns 2011-01-17 11:38:58 EST
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)
Comment 6 Guohua Ouyang 2011-04-22 03:14:42 EDT
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.
Comment 7 errata-xmlrpc 2011-07-27 10:41:20 EDT
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

Note You need to log in before you can comment on or make changes to this bug.