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 1636654 - [abrt] subscription-manager: read(): identity.py:147:reload:AttributeError: module 'os' has no attribute 'errno'
Summary: [abrt] subscription-manager: read(): identity.py:147:reload:AttributeError: m...
Keywords:
Status: CLOSED DUPLICATE of bug 1631339
Alias: None
Product: Fedora
Classification: Fedora
Component: subscription-manager
Version: 29
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Chris Snyder
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:dc6ef03ab9dbb4e5d925c1d8d2a...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-06 09:19 UTC by Stanislav Graf
Modified: 2018-10-15 14:49 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-10-15 14:49:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (2.66 KB, text/plain)
2018-10-06 09:19 UTC, Stanislav Graf
no flags Details
File: cgroup (355 bytes, text/plain)
2018-10-06 09:19 UTC, Stanislav Graf
no flags Details
File: cpuinfo (1.41 KB, text/plain)
2018-10-06 09:19 UTC, Stanislav Graf
no flags Details
File: environ (2.11 KB, text/plain)
2018-10-06 09:19 UTC, Stanislav Graf
no flags Details
File: mountinfo (4.32 KB, text/plain)
2018-10-06 09:19 UTC, Stanislav Graf
no flags Details
File: namespaces (129 bytes, text/plain)
2018-10-06 09:19 UTC, Stanislav Graf
no flags Details
File: open_fds (448 bytes, text/plain)
2018-10-06 09:20 UTC, Stanislav Graf
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1510696 0 urgent CLOSED [Errno 2] No such file or directory: '/etc/pki/consumer/key.pem' 2022-05-16 11:32:56 UTC
Red Hat Knowledge Base (Solution) 3237101 0 None None None 2018-10-10 13:03:14 UTC

Description Stanislav Graf 2018-10-06 09:19:41 UTC
Description of problem:
I tried to run:
~~~
$ sudo subscription-manager register
~~~

Version-Release number of selected component:
subscription-manager-1.23.3-1.fc29

Additional info:
reporter:       libreport-2.9.5
cmdline:        /usr/bin/python3 /usr/sbin/subscription-manager register
crash_function: read
exception_type: FileNotFoundError
executable:     /usr/sbin/subscription-manager
interpreter:    python3-3.7.0-9.fc29.x86_64
kernel:         4.18.11-300.fc29.x86_64
runlevel:       N 5
type:           Python3
uid:            0

Truncated backtrace:
identity.py:147:reload:AttributeError: module 'os' has no attribute 'errno'

Traceback (most recent call last):
  File "/usr/lib64/python3.7/site-packages/subscription_manager/identity.py", line 140, in reload
    self.consumer = self._get_consumer_identity()
  File "/usr/lib64/python3.7/site-packages/subscription_manager/identity.py", line 164, in _get_consumer_identity
    return ConsumerIdentity.read()
  File "/usr/lib64/python3.7/site-packages/subscription_manager/identity.py", line 53, in read
    with open(cls.keypath()) as key_file:
FileNotFoundError: [Errno 2] No such file or directory: '/etc/pki/consumer/key.pem'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 11, in <module>
    load_entry_point('subscription-manager==1.23.3', 'console_scripts', 'subscription-manager')()
  File "/usr/lib64/python3.7/site-packages/subscription_manager/scripts/subscription_manager.py", line 85, in main
    return managercli.ManagerCLI().main()
  File "/usr/lib64/python3.7/site-packages/subscription_manager/managercli.py", line 2838, in __init__
    CLI.__init__(self, command_classes=commands)
  File "/usr/lib64/python3.7/site-packages/subscription_manager/cli.py", line 101, in __init__
    cmd = clazz()
  File "/usr/lib64/python3.7/site-packages/subscription_manager/managercli.py", line 1056, in __init__
    super(RegisterCommand, self).__init__("register", shortdesc, True)
  File "/usr/lib64/python3.7/site-packages/subscription_manager/managercli.py", line 529, in __init__
    super(UserPassCommand, self).__init__(name, shortdesc, primary)
  File "/usr/lib64/python3.7/site-packages/subscription_manager/managercli.py", line 257, in __init__
    self.identity = inj.require(inj.IDENTITY)
  File "/usr/lib64/python3.7/site-packages/subscription_manager/injection.py", line 106, in require
    return FEATURES.require(feature, *args, **kwargs)
  File "/usr/lib64/python3.7/site-packages/subscription_manager/injection.py", line 80, in require
    self.providers[feature] = provider(*args, **kwargs)
  File "/usr/lib64/python3.7/site-packages/subscription_manager/identity.py", line 133, in __init__
    self.reload()
  File "/usr/lib64/python3.7/site-packages/subscription_manager/identity.py", line 147, in reload
    if isinstance(err, IOError) and err.errno == os.errno.ENOENT:
AttributeError: module 'os' has no attribute 'errno'

Local variables in innermost frame:
self: <subscription_manager.identity.Identity object at 0x7fef1efbea20>
msg: "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'"

Comment 1 Stanislav Graf 2018-10-06 09:19:49 UTC
Created attachment 1490996 [details]
File: backtrace

Comment 2 Stanislav Graf 2018-10-06 09:19:51 UTC
Created attachment 1490997 [details]
File: cgroup

Comment 3 Stanislav Graf 2018-10-06 09:19:52 UTC
Created attachment 1490998 [details]
File: cpuinfo

Comment 4 Stanislav Graf 2018-10-06 09:19:54 UTC
Created attachment 1490999 [details]
File: environ

Comment 5 Stanislav Graf 2018-10-06 09:19:56 UTC
Created attachment 1491000 [details]
File: mountinfo

Comment 6 Stanislav Graf 2018-10-06 09:19:58 UTC
Created attachment 1491001 [details]
File: namespaces

Comment 7 Stanislav Graf 2018-10-06 09:20:00 UTC
Created attachment 1491002 [details]
File: open_fds

Comment 9 Kevin Howell 2018-10-15 14:49:25 UTC

*** This bug has been marked as a duplicate of bug 1631339 ***


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