Bug 800459

Summary: subscription-manager config removes the value from /etc/rhsm/rhsm.conf file if the value is not specified
Product: Red Hat Enterprise Linux 6 Reporter: Shwetha Kallesh <skallesh>
Component: subscription-managerAssignee: William Poteat <wpoteat>
Status: CLOSED NOTABUG QA Contact: Entitlement Bugs <entitlement-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.3CC: dgoodwin, wpoteat
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-05 20:45:13 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: 771481    

Description Shwetha Kallesh 2012-03-06 14:08:06 UTC
Description of problem:

subscription-manager config removes the value from /etc/rhsm/rhsm.conf file if the value is not specified

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:

[root@dhcp201-162 ~]# subscription-manager config --server.hostname=
[root@dhcp201-162 ~]# cat /etc/rhsm/rhsm.conf | grep hostname
# Server hostname:
hostname=

  
Actual results:
It removes the value completely

Expected results:
Should either set to default value and display a message saying "set to default value" or throw an error message saying "value is not specified"

Additional info:

Comment 4 RHEL Program Management 2012-07-10 08:48:05 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 5 RHEL Program Management 2012-07-11 01:48:26 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 6 Devan Goodwin 2012-12-05 20:31:57 UTC
Can I propose that we leave the old behaviour in place, I think I honestly prefer it and it makes more sense.

If I run the config command and tell it to set a value, it should get set to whatever I specify.

The default rhsm.conf has four empty properties by default (proxy settings). With this change, if we were to modify one, we can't unset it unless we take it out of the config entirely, whereas previously we could. Once it's gone from the config file it starts getting pretty hard to remember just what properties are supported and which aren't.

I can't see any gain here, we may very well have config properties we want to set as empty, why block it from CLI?

Comment 7 Devan Goodwin 2012-12-05 20:45:13 UTC
Spoke with zeus and jsefler who are agreed the old behaviour is probably preferable, as we do make use of empty properties quite regularly.