Hide Forgot
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:
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.
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.