ckeckbox filter out the part of "Graphic card" when generate test plan

Bug #1649464 reported by Scott Hu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Resource
Fix Released
Critical
Pierre Equoy

Bug Description

Steps: to reproduce:
1. Run checkbox
2. Select Full/Graphic test plan
3. Check the test plan

Actual Result:
ckeckbox filter out the part of "Graphic card"

Other info:
1. SKU: PEA-PT-C3 (201610-25146)
2. BIOS: 0.3.7
3. Manifest: dell-bto-xenial-pearl-X40-iso-20161202-0
4. Failed rate: 10/10
5. This symptom observed on graphic cards AMD W4100, AMD W5100, Nvidia M2000
6. This symptom does not occur on graphic cards Nvidia NVS310, Nvidia M4000, AMD W7100

Revision history for this message
Scott Hu (huntu207) wrote :
Changed in plainbox-provider-checkbox:
importance: Undecided → High
status: New → Confirmed
tags: added: ce-qa-concern
Revision history for this message
Pierre Equoy (pieq) wrote :

Can you provide the CID for this device?

We recently introduced a change to filter unnecessary graphics jobs when running devices with specific hardware (see lp:1636060) so it might not be a bug but a feature :)

Scott Hu (huntu207)
description: updated
Revision history for this message
Scott Hu (huntu207) wrote :

CID is 201610-25146.

We found this symptom would be observed on some graphic cards in the same device includes Nvidia & AMD.
So far it occurred on graphic cards AMD W4100, AMD W5100 & Nvidia M2000

description: updated
Scott Hu (huntu207)
Changed in plainbox-provider-checkbox:
importance: High → Critical
Revision history for this message
Scott Hu (huntu207) wrote :

This symptom also observed on Matira platform

1. SKU: MA5-DVT1-C2(201612-25266), MA7-DVT1-C1(201612-25310)
2. BIOS: 0.3.7
3. Manifest: dell-bto-xenial-pearl-X40-iso-20161202-0
4. Failed rate: 10/10
5. graphic_card_resouce would crash when generate test plan

Pierre Equoy (pieq)
Changed in plainbox-provider-checkbox:
assignee: nobody → Pierre Equoy (pierre-equoy)
Revision history for this message
Pierre Equoy (pieq) wrote :

Thanks to Scott for showing me a device with those symptoms.
(it's a server using desktop Ubuntu image)

Current situation
-----------------

$ ./graphics_card_resource -c ./udev_resource
Traceback (most recent call last):
  File "./graphics_card_resource", line 168, in <module>
    raise SystemExit(main())
  File "./graphics_card_resource", line 122, in main
    video_devices.sort(key=lambda r: bus_ordering(r))
  File "./graphics_card_resource", line 122, in <lambda>
    video_devices.sort(key=lambda r: bus_ordering(r))
  File "./graphics_card_resource", line 97, in bus_ordering
    return int(record.get('path').split(':')[-2])
ValueError: invalid literal for int() with base 10: 'b3'

Root cause
----------

So far, the digit extracted by bus_ordering() had always been a base 10 integer.
However, on servers, the extracted digit looks more like an hexadecimal value (base 16 integer):

/devices/pci0000:b2/0000:b2:00.0/0000:b3:00.0

Solution
--------

In /usr/lib/plainbox-provider-resource-generic/bin/graphics_card_resource, line 96, replace:

    return int(record.get('path').split(':')[-2])

with:

    return int(record.get('path').split(':')[-2], 16)

Result
------

$ ./graphics_card_resource -c ./udev_resource
bus: pci
category: VIDEO
driver: nvidia
index: 1
path: /devices/pci0000:b2/0000:b2:00.0/0000:b3:00.0
prime_gpu_offload: Off
product: PCI ID 0x1cb1
product_id: 7345
product_slug: PCI_ID_0x1cb1
subproduct_id: 4540
subvendor_id: 4136
vendor: NVIDIA Corporation
vendor_id: 4318
vendor_slug: NVIDIA_Corporation

This change should not create regression, but it has to be confirmed by testing on a laptop/desktop before pushing to stable.

Pierre Equoy (pieq)
affects: plainbox-provider-checkbox → plainbox-provider-resource
Changed in plainbox-provider-resource:
milestone: none → 0.31.0
Changed in plainbox-provider-resource:
status: Confirmed → In Progress
Changed in plainbox-provider-resource:
status: In Progress → Fix Committed
Changed in plainbox-provider-resource:
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.