RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1160150 - Subscription-manager repos --list is deleting certificate imported on system
Summary: Subscription-manager repos --list is deleting certificate imported on system
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: William Poteat
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel71
TreeView+ depends on / blocked
 
Reported: 2014-11-04 07:34 UTC by Shwetha Kallesh
Modified: 2015-03-05 13:16 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-03-05 13:16:06 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0502 0 normal SHIPPED_LIVE subscription-manager bug fix and enhancement update 2015-03-05 16:20:39 UTC

Description Shwetha Kallesh 2014-11-04 07:34:44 UTC
Description of problem:
Subscription-manager repos --list is deleting certificate imported on system

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

[root@localhost ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 0.9.32-1
subscription management rules: 5.11
subscription-manager: 1.13.6-1.el7
python-rhsm: 1.13.6-1.el7

How reproducible:


Steps to Reproduce:
[root@localhost ~]# subscription-manager identity
This system is not yet registered. Try 'subscription-manager register --help' for more information.

[root@localhost ~]# subscription-manager list --consumed
No consumed subscription pools to list


[root@localhost ~]# subscription-manager import --cert /root/cert.pem
Successfully imported certificate cert.pem      -------------------> import the cert 


[root@localhost ~]# subscription-manager list --consumed
+-------------------------------------------+
   Consumed Subscriptions
+-------------------------------------------+
Subscription Name: Awesome OS Instance Based one socket
Provides:          Awesome OS Instance Server Bits
SKU:               awesomeos-onesocketib
Contract:          0
Account:           12331131231
Serial:            5327888369135655652
Pool ID:           8ac681e449550268014955038fe20cf3
Active:            True
Quantity Used:     2
Service Level:     Standard
Service Type:      L1-L3
Status Details:    
Subscription Type: 
Starts:            10/28/2014
Ends:              10/28/2015
System Type:       Physical

[root@localhost ~]# subscription-manager repos --list
1 local certificate has been deleted.          -----------> imported cert is deleted


This system has no repositories available through subscriptions.
[root@localhost ~]# subscription-manager list --consumed
No consumed subscription pools to list


Actual results:


Expected results:


Additional info:

Comment 2 William Poteat 2014-11-21 16:08:26 UTC
master commit 5e61237a3ffbf8da3037d4fc1eabc514d69371bf

Comment 4 Shwetha Kallesh 2014-11-24 09:46:14 UTC
Marking verified!!

[root@dhcp35-236 ~]# subscription-manager version
server type: This system is currently not registered.
subscription management server: 0.9.36-1
subscription management rules: 5.11
subscription-manager: 1.13.9-1.el7
python-rhsm: 1.13.8-1.el7


[root@dhcp35-236 ~]# cat /etc/pki/entitlement/6215515425963812223.pem >> /root/cert.pem
[root@dhcp35-236 ~]# cat /etc/pki/entitlement/6215515425963812223-key.pem >> /root/cert.pem
[root@dhcp35-236 ~]# subscription-manager clean
All local data removed
[root@dhcp35-236 ~]# subscription-manager import --cert /root/cert.pem
Successfully imported certificate cert.pem
[root@dhcp35-236 ~]# subscription-manager repos --list
+----------------------------------------------------------+
    Available Repositories in /etc/yum.repos.d/redhat.repo
+----------------------------------------------------------+
Repo ID:   content-label-empty-gpg
Repo Name: content-emptygpg
Repo URL:  https://cdn.redhat.com/foo/path
Enabled:   0

Repo ID:   never-enabled-content
Repo Name: never-enabled-content
Repo URL:  https://cdn.redhat.com/foo/path/never
Enabled:   0

Repo ID:   content-label-no-gpg
Repo Name: content-nogpg
Repo URL:  https://cdn.redhat.com/foo/path
Enabled:   0

Repo ID:   content-label
Repo Name: content
Repo URL:  https://cdn.redhat.com/foo/path
Enabled:   0

Comment 6 errata-xmlrpc 2015-03-05 13:16:06 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.

https://rhn.redhat.com/errata/RHBA-2015-0502.html


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