Bug 805449 - rhncfg do not honour server_name if rhncfg-manager.conf is customized
Summary: rhncfg do not honour server_name if rhncfg-manager.conf is customized
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Spacewalk
Classification: Community
Component: Clients
Version: 1.7
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
Assignee: Milan Zázrivec
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: space18
TreeView+ depends on / blocked
 
Reported: 2012-03-21 10:45 UTC by Miroslav Suchý
Modified: 2012-11-01 16:19 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2012-11-01 16:19:23 UTC
Embargoed:


Attachments (Terms of Use)

Comment 3 Miroslav Suchý 2012-03-24 06:15:41 UTC
Substitution in local_config.

In this code the situation looks as follows:

# server_name = "enter.your.server.url.here"
# print "Using server name", server_name
Using server name enter.your.server.url.here
# local_config.init(self.config_section, defaults=up2date_cfg,
server_name=server_name)
so local_config get that "enter.your.server.url.here" as server_name
but the trick is that rest of that code do not use server_name, but server_url
and local_config get value of server_url from /etc/sysconfig/rhn/rhncfg-manager.conf, which by default is:
# server_url = https://%(server_name)s%(server_handler)s
where %() is macro which is expanded. So string printed in "Using server name" match with value later stored in server_url.
But in this specific case, the value in config file is:
# server_url = https://real.machine.redhat.com/CONFIG-MANAGEMENT-TOOL
and as there are no macros, no substitution happens and rest of the code use different url and hostname, then what is originally printed in "Using server name".

Comment 4 Milan Zázrivec 2012-05-11 14:24:18 UTC
spacewalk.git master: ba948a252975df3ec16ca13f0d51f02cceb7d89a

Comment 5 Jan Pazdziora (Red Hat) 2012-10-30 19:24:07 UTC
Moving ON_QA. Packages that address this bugzilla should now be available in yum repos at http://yum.spacewalkproject.org/nightly/

Comment 6 Jan Pazdziora (Red Hat) 2012-11-01 16:19:23 UTC
Spacewalk 1.8 has been released: https://fedorahosted.org/spacewalk/wiki/ReleaseNotes18


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