Bug 798602

Summary: rhncfg-management doesn't interpret macros
Product: Red Hat Satellite 5 Reporter: colinvann
Component: Configuration ManagementAssignee: Tomas Lestach <tlestach>
Status: CLOSED DEFERRED QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: low Docs Contact:
Priority: unspecified    
Version: 540CC: calba, cperry
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-05-29 20:11:50 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 462714    

Description colinvann 2012-02-29 11:16:58 UTC
Description of problem:
preamble - a config file has been created via the web interface on the satellite server and the system has been subscribed to the correct configuration channel.

what works - if you use the webGUI to deploy the config file to the system, an run rhn_check, everything works and the macro is interpreted and the configuration file looks correct.

what doesn't work - if you use the exact same config file without changes but you use the rhncfg-manager cli tool on the same client system to get the file using the below command it doesn't interpret the macro:

cli command - # rhncfg-manager get -c example-configs /etc/issue -t /

config file content: 
<snip>
*** Example Inc. ***
No trespassing allowed.

IP={|rhn.system.ip_address)|}
</snip>


Version-Release number of selected component (if applicable):
[root@desktop10 config-mgmt]# rpm -q rhncfg-management
rhncfg-management-5.9.27-1.el6sat.noarch


How reproducible: very :)


Steps to Reproduce:
as described above...

  
Actual results:
[root@desktop10 config-mgmt]# rhncfg-manager get -c example-configs -t / /etc/issue
Red Hat Network username: configurator
Password: 
Deploying /etc/issue
[root@desktop10 config-mgmt]# cat /etc/issue
*** Example Inc. ***
No trespassing allowed.

IP={|rhn.system.ip_address|}
[root@desktop10 config-mgmt]# rhn_check 
[root@desktop10 config-mgmt]# cat /etc/issue
*** Example Inc. ***
No trespassing allowed.

IP={|rhn.system.ip_address|}
[root@desktop10 config-mgmt]# ## DEPOYED VIA WEBGUI ##
[root@desktop10 config-mgmt]# rhncfg-manager get -c example-configs -t / /etc/issue
Deploying /etc/issue
[root@desktop10 config-mgmt]# cat /etc/issue
*** Example Inc. ***
No trespassing allowed.

IP={|rhn.system.ip_address|}
[root@desktop10 config-mgmt]# rhn_check 
[root@desktop10 config-mgmt]# cat /etc/issue
*** Example Inc. ***
No trespassing allowed.

IP=192.168.0.10



Expected results:
the macro should be interpreted both ways

Comment 1 Clifford Perry 2012-03-26 15:03:46 UTC
Side note - macro's are expanded out on server side, not client side tools.