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 1017299 - subscription-manager facts --list throws "No module named dmidecode" on ppc64
Summary: subscription-manager facts --list throws "No module named dmidecode" on ppc64
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Adrian Likins
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: 782468 rhsm-rhel70
TreeView+ depends on / blocked
 
Reported: 2013-10-09 15:15 UTC by John Sefler
Modified: 2014-06-18 00:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 12:02:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description John Sefler 2013-10-09 15:15:40 UTC
Description of problem:
On rhel70 ppc64 (and probably on s390x too) subscription-manager facts --list is failing with "No module named dmidecode".

Version-Release number of selected component (if applicable):
[root@ibm-ps701-01-lp2 ~]# rpm -q subscription-manager
subscription-manager-1.10.3-1.el7.ppc64


How reproducible:


Steps to Reproduce:
[root@ibm-ps701-01-lp2 ~]# subscription-manager facts --list
No module named dmidecode
[root@ibm-ps701-01-lp2 ~]# echo $?
255


Actual results:
above


Expected results:
a list of system facts (excluding dmidecode facts since package dmidecode does not ship in ppc64)


Additional info:
[root@ibm-ps701-01-lp2 ~]# tail -f /var/log/rhsm/rhsm.log 
2013-10-09 07:52:54,314 [DEBUG] subscription-manager @hwprobe.py:760 - not looking for dmi info due to system arch 'ppc64' 
2013-10-09 07:52:54,314 [ERROR] subscription-manager @managercli.py:152 - exception caught in subscription-manager
2013-10-09 07:52:54,314 [ERROR] subscription-manager @managercli.py:153 - No module named dmidecode
Traceback (most recent call last):
  File "/usr/sbin/subscription-manager", line 82, in <module>
    sys.exit(abs(main() or 0))
  File "/usr/sbin/subscription-manager", line 73, in main 
    return managercli.ManagerCLI().main()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 2276, in main 
    return CLI.main(self)
  File "/usr/share/rhsm/subscription_manager/cli.py", line 166, in main 
    return cmd.main()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 442, in main 
    return_code = self._do_command()
  File "/usr/share/rhsm/subscription_manager/managercli.py", line 1649, in _do_command
    fact_dict = facts.get_facts()
  File "/usr/share/rhsm/subscription_manager/facts.py", line 87, in get_facts
    facts.update(self._load_hw_facts())
  File "/usr/share/rhsm/subscription_manager/facts.py", line 102, in _load_hw_facts
    return hwprobe.Hardware().get_all()
  File "/usr/share/rhsm/subscription_manager/hwprobe.py", line 831, in get_all 
    import dmidecode
ImportError: No module named dmidecode

Comment 2 Jan Stodola 2013-10-14 09:52:11 UTC
Reproduced on s390x with subscription-manager-1.10.3-1.el7.

Comment 4 Adrian Likins 2013-10-16 20:52:22 UTC

commit ca17f21d5e8bd243dab7c2e18747ffea6279ee63
Author: Adrian Likins <alikins>
Date:   Wed Oct 9 15:28:42 2013 -0400

    1017299: handle dmidecode module not installed
    
    Split dmi info collecting code that uses dmidecode
    into it's own module. hwprobe.Hardware will try to
    pick the right platform specifc info provider to
    use (currently, that's dmiinfo.DmiFirmwareInfoProvider
    or a default noop version).
    
    Previously, RHEL included the python-dmidecode on
    all platforms, even those without DMI or dmidecode.
    The module didn't do anything, but the import would
    succeed. We had an unintentional requirement that
    the 'dmidecode' module exists everywhere, eventhough
    the spec only required it on DMI platforms.
    
    But, previously, rhn-client-tools always required
    'dmidecode' on all platforms, so that dep was
    usually available. When it was not, we hit
    bz#1017299.

Comment 7 John Sefler 2013-10-23 20:22:30 UTC
Verifying...

[root@ibm-p750e-01-lp1 ~]# rpm -q subscription-manager
subscription-manager-1.10.3-1.el7.ppc64
[root@ibm-p750e-01-lp1 ~]# subscription-manager facts --list
No module named dmidecode

^ Problem recreated

[root@ibm-p750e-01-lp1 ~]# rpm -Uvh http://download.devel.redhat.com/nightly/latest-RHEL-7/compose/Server/ppc64/os/Packages/subscription-manager-1.10.4-1.el7.ppc64.rpm
Retrieving http://download.devel.redhat.com/nightly/latest-RHEL-7/compose/Server/ppc64/os/Packages/subscription-manager-1.10.4-1.el7.ppc64.rpm
Preparing...                          ################################# [100%]
Updating / installing...
   1:subscription-manager-1.10.4-1.el7################################# [ 50%]
Cleaning up / removing...
   2:subscription-manager-1.10.3-1.el7################################# [100%]
[root@ibm-p750e-01-lp1 ~]# rpm -q subscription-manager
subscription-manager-1.10.4-1.el7.ppc64

^ Package upgraded

[root@ibm-p750e-01-lp1 ~]# subscription-manager facts --list
cpu.core(s)_per_socket: 1
cpu.cpu(s): 32
cpu.cpu_socket(s): 8
cpu.thread(s)_per_core: 4
cpu.topology_source: kernel /sys cpu sibling lists
distribution.id: Maipo
distribution.name: Red Hat Enterprise Linux Server
distribution.version: 7.0
lscpu.architecture: ppc64
lscpu.byte_order: Big Endian
lscpu.core(s)_per_socket: 1
lscpu.cpu(s): 32
lscpu.cpu_op-mode(s): 32-bit, 64-bit
lscpu.l1d_cache: 32K
lscpu.l1i_cache: 32K
lscpu.model: IBM,8233-E8B
lscpu.numa_node(s): 1
lscpu.numa_node0_cpu(s): 0-31
lscpu.on-line_cpu(s)_list: 0-31
lscpu.socket(s): 8
lscpu.thread(s)_per_core: 4
memory.memtotal: 16165760
memory.swaptotal: 8396736
net.interface.eth0.ipv4_address: 10.16.67.43
net.interface.eth0.ipv4_broadcast: Unknown
net.interface.eth0.ipv4_netmask: 21
net.interface.eth0.ipv6_address.global: 2620:52:0:1040:221:5eff:feaa:ad0
net.interface.eth0.ipv6_address.link: fe80::221:5eff:feaa:ad0
net.interface.eth0.ipv6_address.site: fec0:0:a10:4000:221:5eff:feaa:ad0
net.interface.eth0.ipv6_netmask.global: 64
net.interface.eth0.ipv6_netmask.link: 64
net.interface.eth0.ipv6_netmask.site: 64
net.interface.eth0.mac_address: 00:21:5E:AA:0A:D0
net.interface.lo.ipv4_address: 127.0.0.1
net.interface.lo.ipv4_broadcast: Unknown
net.interface.lo.ipv4_netmask: 8
net.interface.lo.ipv6_address.host: ::1
net.interface.lo.ipv6_netmask.host: 128
network.hostname: ibm-p750e-01-lp1.rhts.eng.bos.redhat.com
network.ipv4_address: 10.16.67.43
network.ipv6_address: ::1
system.certificate_version: 3.2
uname.machine: ppc64
uname.nodename: ibm-p750e-01-lp1.rhts.eng.bos.redhat.com
uname.release: 3.10.0-33.el7.ppc64
uname.sysname: Linux
uname.version: #1 SMP Fri Oct 4 11:14:20 EDT 2013
virt.host_type: Not Applicable
virt.is_guest: False
[root@ibm-p750e-01-lp1 ~]# 

^ Problem fixed

Comment 8 Ludek Smid 2014-06-13 12:02:28 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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