Bug 621135
| Summary: | rhn-client-tools does not count CPUs on s390 | |||
|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 5 | Reporter: | Issue Tracker <tao> | |
| Component: | rhn-client-tools | Assignee: | Michael Mráka <mmraka> | |
| Status: | CLOSED ERRATA | QA Contact: | Pavel Novotny <pnovotny> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 5.5 | CC: | mminar, mmraka, mpoole, pnovotny, psklenar, tao | |
| Target Milestone: | rc | |||
| Target Release: | --- | |||
| Hardware: | All | |||
| OS: | Linux | |||
| Whiteboard: | ||||
| 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.
|
Story Points: | --- | |
| Clone Of: | ||||
| : | 621138 (view as bug list) | Environment: | ||
| Last Closed: | 2011-01-14 00:11:21 UTC | Type: | --- | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 621138 | |||
|
Description
Issue Tracker
2010-08-04 11:11:54 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 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
Fixed in upstream
commit ec14d9bbba2a987ee3ccaf3206e7692959504db8
621135 - report resonable cpuinfo in s390(x)
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.
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 |