Bug 1017299 - subscription-manager facts --list throws "No module named dmidecode" on ppc64
subscription-manager facts --list throws "No module named dmidecode" on ppc64
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager (Show other bugs)
7.0
Unspecified Unspecified
unspecified Severity high
: rc
: ---
Assigned To: Adrian Likins
John Sefler
: Regression, TestBlocker
Depends On:
Blocks: 782468 rhsm-rhel70
  Show dependency treegraph
 
Reported: 2013-10-09 11:15 EDT by John Sefler
Modified: 2014-06-17 20:27 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-13 08:02:28 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Sefler 2013-10-09 11:15:40 EDT
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 05:52:11 EDT
Reproduced on s390x with subscription-manager-1.10.3-1.el7.
Comment 4 Adrian Likins 2013-10-16 16:52:22 EDT

commit ca17f21d5e8bd243dab7c2e18747ffea6279ee63
Author: Adrian Likins <alikins@redhat.com>
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 16:22:30 EDT
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 08:02:28 EDT
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.