Bug 664378 - Timeout of the registration to RHN Satellite is more than expected
Summary: Timeout of the registration to RHN Satellite is more than expected
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: ovirt-node
Version: 5.6
Hardware: All
OS: Linux
urgent
medium
Target Milestone: rc
: ---
Assignee: Mike Burns
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks: 670315
TreeView+ depends on / blocked
 
Reported: 2010-12-20 08:37 UTC by Linqing Lu
Modified: 2013-04-30 22:46 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 670241 (view as bug list)
Environment:
Last Closed: 2011-07-27 14:41:20 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2011:1090 0 normal SHIPPED_LIVE Moderate: rhev-hypervisor security and bug fix update 2011-07-27 14:40:56 UTC

Description Linqing Lu 2010-12-20 08:37:54 UTC
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 11:05:05 UTC
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 16:38:58 UTC
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 07:14:42 UTC
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 14:41:20 UTC
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.