Bug 800035 - Proxy dialog autofills rhsm.conf with blank values
Summary: Proxy dialog autofills rhsm.conf with blank values
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: subscription-manager
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: rc
: ---
Assignee: Alex Wood
QA Contact: J.C. Molet
URL:
Whiteboard:
Depends On:
Blocks: 738066
TreeView+ depends on / blocked
 
Reported: 2012-03-05 16:22 UTC by J.C. Molet
Modified: 2012-03-06 19:51 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-03-06 19:51:24 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description J.C. Molet 2012-03-05 16:22:26 UTC
Description of problem:
The network/proxy dialog will write to the rhsm.conf file even if no changes are to be made.

Version-Release number of selected component (if applicable):
subscription-manager-gnome-0.99.8-1.git.17.90981db.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. Edit /etc/rhsm/rhsm.conf and comment out every proxy setting
2. start up subscription-manager-gui
3. Open the proxy config dialog (everything should be unchecked and blanked)
4. Make no changes
5. Close the dialog

Alternate:
1. Edit /etc/rhsm/rhsm.conf and comment out every proxy setting
2. start up firstboot
3. complete firstboot process, ignoring the proxy config all together
  
Actual results:
#grep proxy /etc/rhsm/rhsm.conf

proxy_hostname = 
proxy_port = 
proxy_user = 
proxy_password = 
# an http proxy server to use
#proxy_hostname = auto-services.usersys.redhat.com
# port for http proxy server
#proxy_port = 3129
# user name for authenticating to an http proxy, if needed
#proxy_user =
# password for basic http proxy auth, if needed
#proxy_password =


the 4 proxy lines are written above the proxy section with no values

Expected results:

Proxy variables would be written only if we set it to an actual value.
The variables should also be written below their corresponding comment that explains what they do, and not outside of their section. Like this:

# an http proxy server to use
proxy_hostname = someNonNullValue
#proxy_hostname = auto-services.usersys.redhat.com
# port for http proxy server
proxy_port = someNumber
#proxy_port = 3129
# user name for authenticating to an http proxy, if needed
#proxy_user =
# password for basic http proxy auth, if needed
#proxy_password =


Additional info:

Comment 2 J.C. Molet 2012-03-06 14:29:44 UTC
On further thought about the order in which the new values are placed, comments in this file could change arbitrarily and looking for specific comment strings may not be the best thing.  So the order in which they currently are could be the best scenario.

I still maintain that blank proxy values should not be written, however.  It would be more consistent with how other linux programs treat these kind of values in their conf files.

Comment 3 Alex Wood 2012-03-06 19:51:24 UTC
The code in question is in networkConfig.py's writeValues() function.

I feel that this is NOTABUG.  Those blank values need to be present to keep ConfigParser from throwing a NoOptionError when parsing the config file.

Please reopen if this issue occurs in the wild or becomes more serious later on.


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