Bug 1300816

Summary: ppc64 systems do not collect cpuinfo 'platform' field that indicates virt.
Product: Red Hat Enterprise Linux 6 Reporter: Adrian Likins <alikins>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED ERRATA QA Contact: John Sefler <jsefler>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.8CC: bcourt, bkearney, csnyder, redakkan
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-05-10 20:39:38 UTC Type: Bug
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: 1151596    
Attachments:
Description Flags
beaker-details none

Description Adrian Likins 2016-01-21 19:42:43 UTC
Description of problem:

We collect some of the fields from /proc/cpuinfo on ppc64, but
that does not include the 'platform' field that indicates
bare-metal/virt.

Steps to Reproduce:
1. find a ppc64 lpar or virt machine, and a ppc64 baremetal machine
2. run 'subscription-manager facts --list' | grep platform
3. It will be empty. It should say 'PowerNV" or "pSeries"

Additional info:

https://bugzilla.redhat.com/show_bug.cgi?id=1147876 references a 
patch/change to virt-what that would update it to also check this
field on ppc64. 

We don't necessarily need both to detect virt, but adding more complete
ppc64 cpuinfo collection is generally useful.

Comment 2 Chris Snyder 2016-01-26 21:07:31 UTC
In upstream master as of the below commit info.

1300816: Add proc_cpuinfo facts for ppc64/le

This includes the 'platform' and 'machine' fields,
which indicate baremetal/virt/lpar.

Make *CpuInfo classes subclass of BaseCpuInfo

Move split_by_processor out of class to module
scope and change to split_kv_list_by_field()

Add ppc64le tests

Comment 5 Rehana 2016-02-11 09:45:40 UTC
Reproducing the issue :

# subscription-manager  version
server type: This system is currently not registered.
subscription management server: 0.9.51.11-1
subscription management rules: 5.15
subscription-manager: 1.16.8-1.el6
python-rhsm: 1.16.6-1.el6

[root@ibm-p8-kvm-03-guest-03 ~]# subscription-manager facts --list | grep -a platform

[root@ibm-p8-kvm-03-guest-03 ~]# subscription-manager facts --list | grep -a machine
uname.machine: ppc64

With updated subscription-manager packages
------------------------------------------
On guest machine:
---------------
# subscription-manager  version
server type: This system is currently not registered.
subscription management server: 0.9.51.11-1
subscription management rules: 5.15
subscription-manager: 1.16.8-2.el6
python-rhsm: 1.16.6-1.el6

# subscription-manager facts --list | grep -a platform
proc_cpuinfo.common.platform: pSeries

# subscription-manager facts --list | grep -a machine
proc_cpuinfo.common.machine: CHRP IBM pSeries (emulated by qemu)
uname.machine: ppc64


on physical machine:
-------------------
# subscription-manager  version
server type: This system is currently not registered.
subscription management server: 0.9.51.11-1
subscription management rules: 5.15
subscription-manager: 1.16.8-2.el6
python-rhsm: 1.16.6-1.el6

# subscription-manager facts --list | grep -a platform
proc_cpuinfo.common.platform: pSeries

# subscription-manager facts --list | grep -a machine
proc_cpuinfo.common.machine: CHRP IBM,8231-E2B
uname.machine: ppc64

Result:
-------
Observed that with update subscription-manager packages , ppc64 machines(physical and guest) machine now displays 'platform' and 'machine' details in the facts list


However i m not sure the bug mentioned in comment 0 (reg : virt-what )should be fixed and verified as well ?

Comment 8 Rehana 2016-02-16 08:46:30 UTC
Created attachment 1127527 [details]
beaker-details

Comment 11 Rehana 2016-02-17 07:56:25 UTC
Marking the bug as "Verified"

Comment 13 errata-xmlrpc 2016-05-10 20:39:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-0797.html