submission parser or cpuinfo parser doesn't handle PowerKVM

Bug #1387843 reported by Jeff Lane 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Support Library
Fix Released
High
Sylvain Pineau
HEXR
Fix Released
Undecided
Unassigned

Bug Description

Note the following:
https://certification.canonical.com/hardware/201405-15025/submission/99134/attachments/

Here's CPU info for a PowerKVM VM:

processor : 0
cpu : POWER8E (raw), altivec supported
clock : 3458.000000MHz
revision : 2.0 (pvr 004b 0200)

timebase : 512000000
platform : pSeries
model : IBM pSeries (emulated by qemu)
machine : CHRP IBM pSeries (emulated by qemu)

When the submission was made, this was not parsed and thus no CPU data appears on the Public or private cert pages for this system.

Related branches

Daniel Manrique (roadmr)
affects: checkbox → checkbox-support
Revision history for this message
Daniel Manrique (roadmr) wrote :

The processor information is being (almost) correctly extracted from cpuinfo according to Ashley's powerpc updates:

    <processors>
      <processor id="0" name="0">
        <property name="count" type="str">1</property>
        <property name="model" type="str">POWER8E (raw), altivec supported</property>
        <property name="model_number" type="str">IBM pSeries (emulated by qemu)</property>
        <property name="model_revision" type="str">2.0</property>
        <property name="model_version" type="str">pvr 004b 0200</property>
        <property name="other" type="str">emulated by qemu</property>
        <property name="platform" type="str">pSeries</property>
        <property name="speed" type="str">3457</property>
        <property name="type" type="str">pSeries</property>
      </processor>
    </processors>

However, when running the submission through the newest parser I get:

$ plainbox dev parse submission </tmp/sub.xml >/tmp/sub.json
viERROR:root:Error running event handler for 'test_run' with args (<checkbox_support.parsers.submission.TestRun object at 0x7f21a13ecb38>,) {}
Traceback (most recent call last):
  File "/src/checkbox/bzr/trunk/checkbox-support/checkbox_support/parsers/submission.py", line 308, in publishEvent
    listener.notify(event)
  File "/src/checkbox/bzr/trunk/checkbox-support/checkbox_support/parsers/submission.py", line 242, in notify
    notify(event)
  File "/src/checkbox/bzr/trunk/checkbox-support/checkbox_support/parsers/submission.py", line 216, in notify
    self.handler(**self.kwargs)
  File "/src/checkbox/bzr/trunk/checkbox-support/checkbox_support/parsers/submission.py", line 687, in setProcessorState
    cache=processor["cache"], other=processor["other"],
KeyError: 'cache'

Also, Sylvain found that the architecture's name is mutating:

17:37 < spineau> roadmr: sounds crazy but it seems that somebody decided to
                 rename ppc64el to ppc64le
(https://lists.debian.org/debian-powerpc/2014/08/msg00040.html).
17:37 < spineau> roadmr: only ppc64le is properly recognized by the parser
17:37 < spineau> roadmr: and guess what the submission has, <architecture
                 value="ppc64el"/>

Revision history for this message
Daniel Manrique (roadmr) wrote :

I found that we are missing the 'cache' and 'bogomips' attributes for these powerpc processors, if I add those manually to the submission I get this result which DOES show processor information:

https://certification.staging.canonical.com/hardware/201112-10259/submission/96877/devices/

SO potentially 2 changes to make:

- Ensure we know about ppc64el and ppc64le and treat them equivalently
- Either ensure the submission parser can cope with missing attributes in processor, or ensure that the cpuinfo parser always supplies all values (even if bogus). I'm not sure what a good bogus/placeholder value would be, as "0" would misleadingly mean the CPU has no cache.

Ideally, we should add the ppc's cpuinfo data so we can verify this with the cpuinfo parser tests which I added in rev 3299. The cpuinfo data in question can be taken from the submission, or it's like this:

processor : 0
cpu : POWER8E (raw), altivec supported
clock : 3458.000000MHz
revision : 2.0 (pvr 004b 0200)

timebase : 512000000
platform : pSeries
model : IBM pSeries (emulated by qemu)
machine : CHRP IBM pSeries (emulated by qemu)

Changed in checkbox-support:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Sylvain Pineau (sylvain-pineau)
Revision history for this message
Ashley Lai (alai) wrote :

Let me know if you need a powerKVM VM to test this. Thanks.

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

@ashley Thanks, I'll come back to you once I've a fix for the cpuinfo parser

Changed in checkbox-support:
milestone: none → 0.14
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

I implemented the proposal with defaults values of -1 for both cache and bogomips which avoids confusion with just 0.

The - accepted - submission.xml: https://hexr.canonical.com/platform/4246/101133/data/data/

Changed in checkbox-support:
status: In Progress → Fix Committed
Changed in checkbox-support:
status: Fix Committed → Fix Released
Revision history for this message
Daniel Manrique (roadmr) wrote :

We need to update the parser in hexr for this, I think. We have a planned deployment in a few days, I'll milestone appropriately. In order to validate this, I think we need to reparse the borked submisison (see original report) and ensure the processor data appears correctly.

Changed in hexr:
status: New → Fix Released
status: Fix Released → Fix Committed
milestone: none → 2015-06
James Jesudason (jamesj)
Changed in hexr:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.