Merge ~rodsmith/checkbox-support:fix-cavium-too-many-ethernet into checkbox-support:master

Proposed by Rod Smith
Status: Rejected
Rejected by: Rod Smith
Proposed branch: ~rodsmith/checkbox-support:fix-cavium-too-many-ethernet
Merge into: checkbox-support:master
Diff against target: 15 lines (+4/-0)
1 file modified
checkbox_support/parsers/udevadm.py (+4/-0)
Reviewer Review Type Date Requested Status
Paul Larson Needs Information
Devices Certification Bot Needs Fixing
Jeff Lane  Needs Fixing
Review via email: mp+331160@code.launchpad.net

Description of the change

Fixes bug #1718749 -- on a Cavium Thunder X server, the ethernet/detect test was failing because udev was reporting POTENTIAL devices in addition to REAL devices. (This server enables configuring the number of Ethernet devices via firmware.)

I've tested this patch on four servers: The affected Cavium server (which now passes the test), bysen in 1SS, and brennan and kzanol on my home network. The latter two have WiFi as well as Ethernet devices, and I saw no change in how these devices were detected. (The test for wireless devices comes before the inserted code that excludes the "potential" devices from the list of udev-detected devices.)

To post a comment you must log in.
Revision history for this message
Jeff Lane  (bladernr) wrote :

Cool. My only concern was for another arm system, but after looking at it's devices, your changes will work fine on it as well.

review: Approve
Revision history for this message
Devices Certification Bot (ce-certification-qa) wrote :

The merge was fine but running tests failed.

[trusty] starting container
[trusty] (timing) 0.08user 0.01system 0:05.21elapsed 1%CPU (0avgtext+0avgdata 16616maxresident)k
[trusty] (timing) 0inputs+32outputs (0major+5371minor)pagefaults 0swaps
[trusty] provisioning container
[trusty] (timing) 21.95user 7.20system 1:15.22elapsed 38%CPU (0avgtext+0avgdata 67508maxresident)k
[trusty] (timing) 199440inputs+1089424outputs (247major+834801minor)pagefaults 0swaps
[trusty-testing] Starting tests...
Found a test script: ./requirements/container-tests-checkbox-support
[trusty-testing] container-tests-checkbox-support: FAIL
[trusty-testing] stdout: https://paste.ubuntu.com/25587759/
[trusty-testing] stderr: https://paste.ubuntu.com/25587760/
[trusty-testing] (timing) Command exited with non-zero status 1
[trusty-testing] (timing) 19.85user 0.32system 0:20.43elapsed 98%CPU (0avgtext+0avgdata 112900maxresident)k
[trusty-testing] (timing) 17952inputs+1232outputs (20major+111144minor)pagefaults 0swaps
[trusty-testing] Fixing file permissions in source directory
[trusty-testing] Destroying container
Name: trusty-testing
State: STOPPED
[xenial] starting container
[xenial] (timing) 0.06user 0.02system 0:04.23elapsed 2%CPU (0avgtext+0avgdata 16540maxresident)k
[xenial] (timing) 32inputs+32outputs (0major+5223minor)pagefaults 0swaps
[xenial] provisioning container
[xenial] (timing) 29.63user 4.80system 1:01.76elapsed 55%CPU (0avgtext+0avgdata 80376maxresident)k
[xenial] (timing) 500832inputs+1632056outputs (445major+980729minor)pagefaults 0swaps
[xenial-testing] Starting tests...
Found a test script: ./requirements/container-tests-checkbox-support
[xenial-testing] container-tests-checkbox-support: FAIL
[xenial-testing] stdout: https://paste.ubuntu.com/25587776/
[xenial-testing] stderr: https://paste.ubuntu.com/25587777/
[xenial-testing] (timing) Command exited with non-zero status 1
[xenial-testing] (timing) 19.52user 0.26system 0:19.94elapsed 99%CPU (0avgtext+0avgdata 118680maxresident)k
[xenial-testing] (timing) 26480inputs+1248outputs (66major+137667minor)pagefaults 0swaps
[xenial-testing] Fixing file permissions in source directory
[xenial-testing] Destroying container
Name: xenial-testing
State: STOPPED

review: Needs Fixing
Revision history for this message
Jeff Lane  (bladernr) wrote :

Try this again and hope tarmac doesn't choke (or PMR)

Revision history for this message
Jeff Lane  (bladernr) wrote :

As rod points out, for some reason this seemingly innocuous change breaks a LOT of tests.

review: Needs Fixing
Revision history for this message
Devices Certification Bot (ce-certification-qa) wrote :

The merge was fine but running tests failed.

[trusty] starting container
[trusty] (timing) 0.07user 0.02system 0:05.21elapsed 1%CPU (0avgtext+0avgdata 16740maxresident)k
[trusty] (timing) 0inputs+32outputs (0major+5416minor)pagefaults 0swaps
[trusty] provisioning container
[trusty] (timing) 21.56user 7.39system 1:04.35elapsed 44%CPU (0avgtext+0avgdata 67588maxresident)k
[trusty] (timing) 200056inputs+1090560outputs (247major+838385minor)pagefaults 0swaps
[trusty-testing] Starting tests...
Found a test script: ./requirements/container-tests-checkbox-support
[trusty-testing] container-tests-checkbox-support: FAIL
[trusty-testing] stdout: https://paste.ubuntu.com/25587945/
[trusty-testing] stderr: https://paste.ubuntu.com/25587946/
[trusty-testing] (timing) Command exited with non-zero status 1
[trusty-testing] (timing) 18.44user 0.26system 0:18.78elapsed 99%CPU (0avgtext+0avgdata 112780maxresident)k
[trusty-testing] (timing) 2448inputs+1232outputs (20major+114224minor)pagefaults 0swaps
[trusty-testing] Fixing file permissions in source directory
[trusty-testing] Destroying container
Name: trusty-testing
State: STOPPED
[xenial] starting container
[xenial] (timing) 0.06user 0.02system 0:04.23elapsed 2%CPU (0avgtext+0avgdata 16552maxresident)k
[xenial] (timing) 32inputs+32outputs (0major+5212minor)pagefaults 0swaps
[xenial] provisioning container
[xenial] (timing) 29.44user 4.76system 0:59.93elapsed 57%CPU (0avgtext+0avgdata 80344maxresident)k
[xenial] (timing) 493256inputs+1632064outputs (427major+1015481minor)pagefaults 0swaps
[xenial-testing] Starting tests...
Found a test script: ./requirements/container-tests-checkbox-support
[xenial-testing] container-tests-checkbox-support: FAIL
[xenial-testing] stdout: https://paste.ubuntu.com/25587952/
[xenial-testing] stderr: https://paste.ubuntu.com/25587953/
[xenial-testing] (timing) Command exited with non-zero status 1
[xenial-testing] (timing) 19.38user 0.32system 0:19.77elapsed 99%CPU (0avgtext+0avgdata 118636maxresident)k
[xenial-testing] (timing) 11856inputs+1248outputs (69major+138448minor)pagefaults 0swaps
[xenial-testing] Fixing file permissions in source directory
[xenial-testing] Destroying container
Name: xenial-testing
State: STOPPED

review: Needs Fixing
Revision history for this message
Paul Larson (pwlars) wrote :

Just so we can see exactly what you're dealing with, can you please attach the output from that system for: 'udevadm info --export-db'

review: Needs Information
Revision history for this message
Rod Smith (rodsmith) wrote :

On 09/21/2017 03:31 PM, Paul Larson wrote:
> Review: Needs Information
>
> Just so we can see exactly what you're dealing with, can you please attach the output from that system for: 'udevadm info --export-db'

Here it is:

https://pastebin.canonical.com/199060/

--
Rod Smith
Server and Cloud Certification Engineer
<email address hidden>

Revision history for this message
Rod Smith (rodsmith) wrote :

I'm abandoning this merge request in favor of another one that takes a
completely different approach:

https://code.launchpad.net/~rodsmith/plainbox-provider-checkbox/+git/plainbox-provider-checkbox/+merge/331164

Unmerged commits

a7b1036... by Rod Smith

Fixed bug that caused udev to detect too many Ethernet devices on a Cavium Thunder X server

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/checkbox_support/parsers/udevadm.py b/checkbox_support/parsers/udevadm.py
2index 55efe46..2b08242 100644
3--- a/checkbox_support/parsers/udevadm.py
4+++ b/checkbox_support/parsers/udevadm.py
5@@ -251,6 +251,10 @@ class UdevadmDevice(object):
6 if class_id == Pci.BASE_CLASS_NETWORK:
7 if subclass_id == Pci.CLASS_NETWORK_WIRELESS:
8 return "WIRELESS"
9+ # Some NICs (e.g., on zygarde, a Cavium Thunder X) produce
10+ # inactive udev entries with no interfaces. Ignore these....
11+ elif self._interface == None:
12+ return "UNKNOWN"
13 else:
14 return "NETWORK"
15 if class_id == Pci.BASE_CLASS_DISPLAY:

Subscribers

People subscribed via source and target branches