Bug 621135 - rhn-client-tools does not count CPUs on s390
Summary: rhn-client-tools does not count CPUs on s390
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: rhn-client-tools
Version: 5.5
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Michael Mráka
QA Contact: Pavel Novotny
URL:
Whiteboard:
Depends On:
Blocks: 621138
TreeView+ depends on / blocked
 
Reported: 2010-08-04 11:11 UTC by Issue Tracker
Modified: 2018-11-14 17:28 UTC (History)
6 users (show)

Fixed In Version: rhn-client-tools-0.4.20-40.el5
Doc Type: Bug Fix
Doc Text:
The number of CPUs is now reported correctly on IBM System z.
Clone Of:
: 621138 (view as bug list)
Environment:
Last Closed: 2011-01-14 00:11:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2011:0112 0 normal SHIPPED_LIVE yum-rhn-plugin and rhn-client-tools bug fix and enhancement update 2011-01-12 17:29:05 UTC

Description Issue Tracker 2010-08-04 11:11:54 UTC
Escalated to Bugzilla from IssueTracker

Comment 1 Issue Tracker 2010-08-04 11:11:56 UTC
Event posted on 2010-08-04 04:10 BST by tscott

Product & Version:
RHN Satellite 5.3

When Did Problem Start:
From the beginning of use

Description of Problem:
Satelite doesn't correctly report the number of vCPUs on guests in s390/s390x architecture

Related fix was done in spacewalk-reports and its changelog entry as below:

2010-05-03 22:00:00
Jan Pazdziora 0.7.0-4:
- 588277 - There is one rhnCpu record per each rhnServer, number of CPUs is in nrcpu.

However, as the customer pointed out in the ticket that

/usr/share/rhn/up2date_client/hardware.py

seems to give always 1 as CPU count for s390/s390x architecture.
(Please see the ticket entry)


Action Requested of L2:
Correct counting of vCPUs on s390/s390x guest systems.

Files:

KCS Solution Doc:
DOC-31128
This event sent from IssueTracker by mpoole  [Support Engineering Group]
 issue 1223303

Comment 2 Issue Tracker 2010-08-04 11:11:58 UTC
Event posted on 2010-08-04 04:28 BST by tscott

I've done some initial analysis, and it appears that there is no
s390-specific code in hardware.py. The /proc/cpuinfo on s390 presents
processors quite differently to i386 or x86_64.

It should be possible to add a check at around line 610 in
/usr/share/rhn/up2date_client/hardware.py, with something like the
following:

--- s390-hardware.py    2010-08-04 13:21:26.000000000 +1000
+++ /usr/share/rhn/up2date_client/hardware.py   2010-03-25
00:48:09.000000000 +1000
@@ -610,30 +610,7 @@
             hwdict['speed'] = int(round(float(mhz_speed)) - 1)
         except ValueError:
             hwdict['speed'] = -1
-        
-    elif uname in ['s390x', 's390']:
-        tmpdict = {}
-        count = 0
-        for cpu in string.split(cpulist, "\n"):
-            if cpu[:8] in ['processor']:
-                count = count + 1
-            if cpu[:5] in ['vendor']:
-                vals = string.split(cpu, ":")
-                vendor = string.strip(vals[0])
+         
         
     else:
         # XXX: expand me. Be nice to other

This is obviously incomplete, but shows the logic that needs to be
applied.

An example of s390's /proc/cpuinfo:
--------
[root@gss4 ~]# cat /proc/cpuinfo 
vendor_id       : IBM/S390
# processors    : 2
bogomips per cpu: 1661.33
features        : esan3 zarch stfle msa ldisp eimm dfp 
processor 0: version = FF,  identification = 04C5C2,  machine = 2097
processor 1: version = FF,  identification = 04C5C2,  machine = 2097
--------

Thanks,

Tristan Scott
GSS APAC

Status set to: Waiting on Tech
Summary edited.

This event sent from IssueTracker by mpoole  [Support Engineering Group]
 issue 1223303

Comment 4 Michael Mráka 2010-08-31 10:33:06 UTC
Fixed in upstream
commit ec14d9bbba2a987ee3ccaf3206e7692959504db8
    621135 - report resonable cpuinfo in s390(x)

Comment 7 Jaromir Hradilek 2010-11-30 12:33:36 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
The number of CPUs is now reported correctly on IBM System z.

Comment 9 errata-xmlrpc 2011-01-14 00:11:21 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-0112.html


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