Bug 696791 - No such file or directory: '/sys/devices/system/cpu//cpu1/topology/physical_package_id'
Summary: No such file or directory: '/sys/devices/system/cpu//cpu1/topology/physical_p...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: subscription-manager
Version: 5.7
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: ---
Assignee: Adrian Likins
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: 675214
TreeView+ depends on / blocked
 
Reported: 2011-04-14 20:18 UTC by John Sefler
Modified: 2011-07-21 12:30 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-21 08:45:18 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:1078 0 normal SHIPPED_LIVE new package: subscription-manager 2011-07-21 08:45:07 UTC

Description John Sefler 2011-04-14 20:18:23 UTC
Description of problem:
I just attempted the automated tests against a s390x client and the logs contain register attempt results in this:

ssh root.eng.bos.redhat.com subscription-manager register --username=testuser1 --password=password
Stdout:
Stderr: [Errno 2] No such file or directory: '/sys/devices/system/cpu//cpu1/topology/physical_package_id'
ExitCode: 255


Version-Release number of selected component (if applicable):
201104141546:04.830 - INFO: Candlepin server 'jsefler-f14-5beakerpin.usersys.redhat.com' is running version: 0.2.16
201104141546:04.830 - INFO: Installed version of subscription-manager...
201104141546:04.830 - FINE: ssh root.eng.bos.redhat.com rpm -q subscription-manager
201104141546:04.882 - FINE: Stdout: subscription-manager-0.95.5.7-1.el5


How reproducible:


Steps to Reproduce:
1. attempt to register

  
Actual results:


Expected results:


Additional info:

Comment 1 John Sefler 2011-04-14 20:26:41 UTC
I suspect an error in the sm code that is being used to determine the number of sockets on the system because i know that alikins taught me an algorithim that marches through the /sys/devices/system/cpu subdirectories to determine the number of socket for rhel5 since lscpu (which was used in rhel6) does not exist on rhel5.

Comment 2 John Sefler 2011-04-25 22:33:12 UTC
Additional Info:
For what it's worth, here is the command line algorithm that I am running on rhel5.7 to get a value for sockets that I will then compare to what subscription-manager facts returns so that I can make a test assertion.  Note that my algorithm is also failing with "No such file or directory" on s390x:

201104181332:11.475 - FINE: ssh root.eng.bos.redhat.com for cpu in `ls -1 /sys/devices/system/cpu/ | egrep cpu[[:digit:]]`; do echo "cpu `cat /sys/devices/system/cpu/$cpu/topology/physical_package_id`"; done | grep cpu | uniq | wc -l
201104181332:11.645 - FINE: Stdout: 1
201104181332:11.646 - FINE: Stderr: 
cat: /sys/devices/system/cpu/cpu0/topology/physical_package_id: No such file or directory
cat: /sys/devices/system/cpu/cpu1/topology/physical_package_id: No such file or directory
201104181332:11.647 - FINE: ExitCode: 0


Reference: http://hudson.rhq.lab.eng.bos.redhat.com:8080/hudson/view/Entitlement/job/rhsm-beaker-on-premises-RHEL5.7/20/

Comment 3 Adrian Likins 2011-05-12 17:34:57 UTC
commit 41435ad8bd68e4845b139e7b988b1260a50b55c4
Author: Adrian Likins <alikins>
Date:   Thu May 12 12:11:17 2011 -0400

    696791: Handle exceptions thrown in hardware detection modules.
    
    Original bug was a  failure on s390x for detecting cpu sockets, but
    we need to handle the more general case of hardware detection failing
    better.


cb31dc3e0437c054449a3292c4d108a21775afd9 in master

Still need to revisit how to actually gather useful info from s390x, but this
will fix the crash.

Comment 4 John Sefler 2011-05-20 21:51:51 UTC
Verifying Version....

[root@ibm-z10-05 ~]# rpm -q subscription-manager
subscription-manager-0.95.5.18-1.el5
[root@ibm-z10-05 ~]# rpm -q subscription-manager --changelog | grep 696791
- 696791: Handle exceptions thrown in hardware detection modules.
[root@ibm-z10-05 ~]# uname -a
Linux ibm-z10-05.rhts.eng.bos.redhat.com 2.6.18-262.el5 #1 SMP Mon May 16 17:52:56 EDT 2011 s390x s390x s390x GNU/Linux

[root@ibm-z10-05 ~]# subscription-manager register --username=qa
Password: 
a9c96915-7304-4571-b0cc-ec0c682b7a37 ibm-z10-05.rhts.eng.bos.redhat.com
[root@ibm-z10-05 ~]# 


^^^ VERIFIED that we can now register without a crash on s390x


[root@ibm-z10-05 ~]# subscription-manager facts --list
distribution.id: Tikanga
distribution.name: Red Hat Enterprise Linux Server
distribution.version: 5.7
memory.memtotal: 508952
memory.swaptotal: 1048568
net.interface.eth0.broadcast: 10.16.71.255
net.interface.eth0.hwaddr: 02:de:ad:be:ef:05
net.interface.eth0.ipaddr: 10.16.66.196
net.interface.eth0.netmask: 255.255.248.0
net.interface.lo.broadcast: 0.0.0.0
net.interface.lo.hwaddr: 00:00:00:00:00:00
net.interface.lo.ipaddr: 127.0.0.1
net.interface.lo.netmask: 255.0.0.0
net.interface.sit0.broadcast: unknown
net.interface.sit0.hwaddr: 00:00:00:00:00:00
net.interface.sit0.ipaddr: unknown
net.interface.sit0.netmask: unknown
network.hostname: ibm-z10-05.rhts.eng.bos.redhat.com
network.ipaddr: 10.16.66.196
system.entitlements_valid: False
uname.machine: s390x
uname.nodename: ibm-z10-05.rhts.eng.bos.redhat.com
uname.release: 2.6.18-262.el5
uname.sysname: Linux
uname.version: #1 SMP Mon May 16 17:52:56 EDT 2011
virt.host_type: ibm_systemz
ibm_systemz-zvm
virt.is_guest: True
[root@ibm-z10-05 ~]# 


^^^ Notice that the detected hardware facts (e.g. cpu.* and dmi.*) that are normally detected on other hardware is excluded from this s390x list.

As alikins said, "Still need to revisit how to actually gather useful info from s390x..."

Comment 5 errata-xmlrpc 2011-07-21 08:45:18 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-1078.html

Comment 6 errata-xmlrpc 2011-07-21 12:30:12 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHEA-2011-1078.html


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