Bug 805449 - rhncfg do not honour server_name if rhncfg-manager.conf is customized
rhncfg do not honour server_name if rhncfg-manager.conf is customized
Product: Spacewalk
Classification: Community
Component: Clients (Show other bugs)
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Milan Zazrivec
Red Hat Satellite QA List
Depends On:
Blocks: space18
  Show dependency treegraph
Reported: 2012-03-21 06:45 EDT by Miroslav Suchý
Modified: 2012-11-01 12:19 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-11-01 12:19:23 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Comment 3 Miroslav Suchý 2012-03-24 02:15:41 EDT
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,
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 Zazrivec 2012-05-11 10:24:18 EDT
spacewalk.git master: ba948a252975df3ec16ca13f0d51f02cceb7d89a
Comment 5 Jan Pazdziora 2012-10-30 15:24:07 EDT
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 2012-11-01 12:19:23 EDT
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.