DPDK init scripts need some hardening against broken specifications in /etc/dpdk/interfaces

Bug #1551601 reported by Christian Ehrhardt 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dpdk (Ubuntu)
Fix Released
High
Christian Ehrhardt 

Bug Description

While testing it became obvious, that while working we need some more resiliency and user friendly messages in case something goes wrong.

Today we have cases like:
- forgot the bus spec -> just doesn't do anything (silently)
- wrong pci ID -> fail to start the service in general
- no module specified -> fail with unclear modprobe error (due to empty name)

The init script needs some hardening and better error messages.

Changed in dpdk (Ubuntu):
status: New → Triaged
importance: Undecided → High
assignee: nobody → ChristianEhrhardt (paelzer)
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Changes would be ready for upload now.

I'll attach a debdiff dpdk_2.2.0-0ubuntu3-to-2.2.0-0ubuntu4.debdiff
But for much easier review change by change I would recommend https://git.launchpad.net/~ubuntu-server/dpdk/?h=ubuntu-xenial-to-dpdk2.2
The respective content of this upload is from tag "debian/2.2.0-0ubuntu3" until the head of the branch.

Overall it will fix this and three other bugs plus a few minor issues - here the changelog FYI

dpdk (2.2.0-0ubuntu4) xenial; urgency=medium

  * harden d/dpdk-init for configuration issues (LP: #1551601):
     - detect and warn about bad bus specifications
     - detect and warn about incomplete device specifications
     - detect and warn about non existing pci IDs
     - d/t/test-initscripts now testing various misconfigs
     - d/t/test-initscripts now also verifying service status
  * d/dpdk-init d/dpdk.conf now also support 1G hugepages (LP: #1551767):
     - detect and warn if 1G pages are not available but configured
     - d/t/test-initscripts now also testing hugepage allocations
     - d/dpdk.conf has an option to drop caches to incease the likeliness of
       successful 1G hugepage allocations (default off)
  * d/rules replaced uname -m with DEB_HOST_GNU_CPU (LP: #1551796):
  * fix testpmd to run without Xen environment (LP: #1551752):
     - upstream discussion is slow, but we need a fix now. We can drop this
       and change to the upstream solution when it is available.
  * unify whitespace/tabs in packaging and scripts
     - tabs/spaces to just spaces in d/dpdk-init and d/dpdk.init
     - few to tabs in d/rules
  * d/t/test-* now satisfy shellcheck
  * d/* fix various comments and guides to be more readable
  * d/dpdk-init and d/copyright updated copyright information

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

dpdk (2.2.0-0ubuntu4) xenial; urgency=medium

  * harden d/dpdk-init for configuration issues (LP: #1551601):
     - detect and warn about bad bus specifications
     - detect and warn about incomplete device specifications
     - detect and warn about non existing pci IDs
     - d/t/test-initscripts now testing various misconfigs
     - d/t/test-initscripts now also verifying service status
  * d/dpdk-init d/dpdk.conf now also support 1G hugepages (LP: #1551767):
     - detect and warn if 1G pages are not available but configured
     - d/t/test-initscripts now also testing hugepage allocations
     - d/dpdk.conf has an option to drop caches to incease the likeliness of
       successful 1G hugepage allocations (default off)
  * d/rules replaced uname -m with DEB_HOST_GNU_CPU (LP: #1551796):
  * fix testpmd to run without Xen environment (LP: #1551752):
     - upstream discussion is slow, but we need a fix now. We can drop this
       and change to the upstream solution when it is available.
  * unify whitespace/tabs in packaging and scripts
     - tabs/spaces to just spaces in d/dpdk-init and d/dpdk.init
     - few to tabs in d/rules
  * d/t/test-* now satisfy shellcheck
  * d/* fix various comments and guides to be more readable
  * d/dpdk-init and d/copyright updated copyright information

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Since there was no update yet I wrapped in another minor enhancement that is tied directly with this LP Bug.
Git repository is updated as well.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Found an uploader, wrapping two more fixes before that.
Therefore removing the debdiff and sponsors subscription from this bug for now.

Changed in dpdk (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package dpdk - 2.2.0-0ubuntu5

---------------
dpdk (2.2.0-0ubuntu5) xenial; urgency=medium

  * d/t/test-initscripts fix issues regarding 1G hugepages
     - the dep8 was already taking care of 1G hugepages being not supported in
       some environments. But it was failing when supported, but not enough
       memory available.

 -- Christian Ehrhardt <email address hidden> Wed, 09 Mar 2016 17:19:24 +0000

Changed in dpdk (Ubuntu):
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.