Bug 979038 - rhn-proxy-activate does not obtain default options from up2date
Summary: rhn-proxy-activate does not obtain default options from up2date
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite Proxy 5
Classification: Red Hat
Component: Server
Version: 560
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks: sat560-proxy 1010956
TreeView+ depends on / blocked
 
Reported: 2013-06-27 13:21 UTC by Dimitar Yordanov
Modified: 2013-10-01 19:39 UTC (History)
3 users (show)

Fixed In Version: spacewalk-proxy-installer-1.10.7-1
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1010956 (view as bug list)
Environment:
Last Closed: 2013-10-01 19:39:56 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 2 Lukas Pramuk 2013-09-23 11:08:54 UTC
VERIFIED.
# rpm -q spacewalk-proxy-installer
spacewalk-proxy-installer-2.0.1-2.el6sat.noarch

#  grep -e rhn_parent -e http_proxy /etc/rhn/rhn.conf 
proxy.http_proxy = localhost:3128
proxy.http_proxy_username = user
proxy.http_proxy_password = pass
proxy.rhn_parent = xmlrpc.rhn.redhat.com

# rhn-proxy-activate --help
Usage: rhn-proxy-activate [options]

Options:
  -s SERVER, --server=SERVER
                        alternative server hostname to connect to, default is
                        'xmlrpc.rhn.redhat.com'
  --http-proxy=HTTP_PROXY
                        alternative HTTP proxy to connect to (HOSTNAME:PORT),
                        default is ''
  --http-proxy-username=HTTP_PROXY_USERNAME
                        alternative HTTP proxy usename, default is ''
  --http-proxy-password=HTTP_PROXY_PASSWORD
                        alternative HTTP proxy password, default is ''
  --ca-cert=CA_CERT     alternative SSL certificate to use, default is ''
  --no-ssl              turn off SSL (not advisable), default is on.
  --version=VERSION     which X.Y version of the Spacewalk Proxy are you
                        upgrading to? Default is your current proxy version
                        (5.2)
  -m, --enable-monitoring
                        enable MonitoringScout on this proxy.
  --deactivate          deactivate proxy, if already activated
  -l, --list-available-versions
                        print list of versions available to this system
  --non-interactive     non-interactive mode
  -q, --quiet           quiet non-interactive mode.
  -h, --help            show this help message and exit

# rhn-proxy-activate --version=5.6

--server (RHN parent):  xmlrpc.rhn.redhat.com
--http-proxy:           
--http-proxy-username:  
--http-proxy-password:  
--ca-cert:              
--no-ssl:               false
--version:              5.6

Are you sure about these options? y/n: y
Spacewalk Proxy successfully deactivated.
Spacewalk Proxy successfully activated.

>>> only rhn_parent is parsed as SERVER
>>> still http_proxy options need to be done too ( different bz )

Comment 3 Lukas Pramuk 2013-09-23 12:53:50 UTC
Oops, step #2 in comment#2 has to be:

#  grep -e serverURL= -e httpProxy= -e sslCACert= /etc/sysconfig/rhn/up2date
serverURL=https://xmlrpc.rhn.redhat.com/XMLRPC
sslCACert=/usr/share/rhn/RHNS-CA-CERT
httpProxy=squid.redhat.com:3128



Anyway this fix introduced more mess into parsing options during proxy activation/recativation and the solution should be more complex considering rhn.conf file presence. (reactivation)

see bz #1010956

Comment 4 Lukas Pramuk 2013-09-23 13:33:14 UTC
I'm sceptical whether the parsing of up2date is needed at all during 1st proxy activation (rhn.conf not present).

up2date file is parsed by configure-proxy.sh install script anyway and rhn-proxy-activate is run within using parsed options. No need for rhn-proxy-activate to parse up2date options itself. 

During reactivation only rhn.conf file matters, don't mess with up2date.

Comment 5 Clifford Perry 2013-10-01 19:39:56 UTC
Red Hat Satellite Proxy 5.6 has been released. This bug tracked under Proxy. 

This bug either was VERIFIED or RELEASE_PENDING (re-verified prior shortly
before release). 

Moving to CLOSED CURRENT_RELEASE. 

Text from Upgrade Erratum follows:



Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2013-1392.html


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