Bug 916369 - insecure in rhsm.comf should not be updated when using --insecure option if command fails
Summary: insecure in rhsm.comf should not be updated when using --insecure option if c...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.10
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: beta
: 5.10
Assignee: Bryan Kearney
QA Contact: IDM QE LIST
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel510 rhsm-2013
TreeView+ depends on / blocked
 
Reported: 2013-02-27 22:47 UTC by Sharath Dwaral
Modified: 2013-09-30 22:58 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: The parameter parsing code was always updating the configuration whenever the --insecure option was present. Consequence: The --insecure option would always overwrite the configuration value. Fix: Delayed the insecure value persistence until after the command completes. Result: A more consistent experience for the user.
Clone Of:
Environment:
Last Closed: 2013-09-30 22:58:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1332 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2013-09-30 22:49:24 UTC

Description Sharath Dwaral 2013-02-27 22:47:45 UTC
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:

Comment 1 Sharath Dwaral 2013-02-28 00:06:22 UTC
Related to Bug 844411

Comment 3 Bryan Kearney 2013-03-05 16:14:31 UTC
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

Comment 4 Sharath Dwaral 2013-03-12 15:28:08 UTC
# 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

Comment 5 RHEL Program Management 2013-04-09 20:49:57 UTC
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.

Comment 7 errata-xmlrpc 2013-09-30 22:58:02 UTC
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


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