Description of problem: When using --insecure option the insecure should not be set in rhsm.conf file when the transaction does not complete successfully. Version-Release number of selected component (if applicable): # rpm -qa | egrep "subscription-manager|python-rhsm" subscription-manager-gui-1.8.3-1.el7.x86_64 subscription-manager-debuginfo-1.8.3-1.el7.x86_64 subscription-manager-1.8.3-1.el7.x86_64 subscription-manager-firstboot-1.8.3-1.el7.x86_64 python-rhsm-debuginfo-1.8.3-1.el7.x86_64 python-rhsm-1.8.3-1.el7.x86_64 subscription-manager-migration-1.8.3-1.el7.x86_64 How reproducible: Always Steps to Reproduce: # subscription-manager identity This system is not yet registered. Try 'subscription-manager register --help' for more information. # cat /etc/rhsm/rhsm.conf | grep insecure insecure = 0 # subscription-manager register --serverurl fsharath-candlepin.usersys.redhat.com:8443/candlepin --insecure Username: ^C User interrupted process. # cat /etc/rhsm/rhsm.conf | grep insecure insecure=1 Actual results: As shown above Expected results: insecure should be set only when the transaction completes succefully. Additional info:
Related to Bug 844411
https://github.com/candlepin/subscription-manager/pull/523
commit b539676648028688d3018f0a04c2f7ea0e4372b8 Author: Bryan Kearney <bkearney> Date: Mon Mar 4 16:41:15 2013 -0500 916369: Do not persist config changes until the action completes
# rpm -qa | egrep "subscription-manager|python-rhsm" subscription-manager-firstboot-1.8.4-1.el7.x86_64 python-rhsm-1.8.7-1.el7.x86_64 subscription-manager-gui-1.8.4-1.el7.x86_64 subscription-manager-migration-1.8.4-1.el7.x86_64 subscription-manager-1.8.4-1.el7.x86_64 subscription-manager-debuginfo-1.8.4-1.el7.x86_64 # subscription-manager identity This system is not yet registered. Try 'subscription-manager register --help' for more information. # cat /etc/rhsm/rhsm.conf | grep insecure insecure=0 # subscription-manager register --serverurl fsharath-candlepin.usersys.redhat.com:8443/candlepin --insecure Username: ^C User interrupted process. # cat /etc/rhsm/rhsm.conf | grep insecure insecure=0 # subscription-manager register --serverurl fsharath-candlepin.usersys.redhat.com:8443/candlepin --insecure Username: testuser1 Password: User interrupted process. # cat /etc/rhsm/rhsm.conf | grep insecure insecure=0 # subscription-manager register --serverurl fsharath-candlepin.usersys.redhat.com:8443/candlepin --insecure Username: testuser1 Password: Organization: ^C User interrupted process. # cat /etc/rhsm/rhsm.conf | grep insecure #insecure = 0 insecure=0 # subscription-manager register --serverurl fsharath-candlepin.usersys.redhat.com:8443/candlepin --insecure Username: testuser1 Password: Organization: snowwhite The system has been registered with id: a763a15f-6655-4454-9503-806a0aa8f8ed Verified
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux release for currently deployed products. This request is not yet committed for inclusion in a release.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1332.html