Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1510696 - [Errno 2] No such file or directory: '/etc/pki/consumer/key.pem'
Summary: [Errno 2] No such file or directory: '/etc/pki/consumer/key.pem'
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.5
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: rc
: ---
Assignee: Jiri Hnidek
QA Contact: Red Hat subscription-manager QE Team
URL:
Whiteboard:
Depends On:
Blocks: 1559227
TreeView+ depends on / blocked
 
Reported: 2017-11-08 02:30 UTC by Wei Liu
Modified: 2020-09-01 14:59 UTC (History)
17 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1559227 (view as bug list)
Environment:
Last Closed: 2020-09-01 14:59:36 UTC
Target Upstream Version:
Embargoed:
skallesh: needinfo+


Attachments (Terms of Use)
the rhsm log (16.50 KB, text/plain)
2017-11-08 02:30 UTC, Wei Liu
no flags Details

Description Wei Liu 2017-11-08 02:30:34 UTC
Created attachment 1349190 [details]
the rhsm log

Description of problem:
Error message shown in rhsm.log when try to register system and attach subscriptions

Version-Release number of selected component (if applicable):
[root@cloud-qe-16-vm-01 rhsm]# rpm -qa | egrep "subscription|rhsm"
subscription-manager-gui-1.20.5-1.el7.x86_64
subscription-manager-rhsm-certificates-1.20.5-1.el7.x86_64
subscription-manager-rhsm-1.20.5-1.el7.x86_64
subscription-manager-1.20.5-1.el7.x86_64
subscription-manager-initial-setup-addon-1.20.5-1.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1.Install build RHEL-7.5-20171107.1

2.Register system and attach subscription
[root@cloud-qe-16-vm-01 rhsm]# subscription-manager register
Registering to: subscription.rhsm.stage.redhat.com:443/subscription
Username: rnew_test
Password: 
The system has been registered with ID: bb6e0c8d-46f7-4bbc-b3fe-483fbc3a99d2
The registered system name is: cloud-qe-16-vm-01.idmqe.lab.eng.bos.redhat.com
[root@cloud-qe-16-vm-01 rhsm]# subscription-manager attach --auto
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status:       Subscribed

3.Check the rhsm.log
[root@cloud-qe-16-vm-01 rhsm]# cat rhsm.log | grep -i error
2017-11-08 02:15:51,800 [ERROR] subscription-manager:12608:MainThread @identity.py:145 - Reload of consumer identity cert /etc/pki/consumer/cert.pem raised an exception with msg: [Errno 2] No such file or directory: '/etc/pki/consumer/key.pem'

Actual results:
Error message shown in rhsm.log
[Errno 2] No such file or directory: '/etc/pki/consumer/key.pem'

Expected results:
No error messages in rhsm.log

Additional info:

Comment 10 Jiri Hnidek 2018-11-13 12:54:49 UTC
Hi,
I believe that this bug is already fixed in master branch. As you can see, when IOError has errno equal to 2, then debug message is printed to log file:

https://github.com/candlepin/subscription-manager/blob/master/src/subscription_manager/identity.py#L148


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