Modify dmidecode jobs to use new dmi.supported resource

Bug #1706213 reported by Jeff Lane 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Fix Released
Medium
Unassigned

Bug Description

From this MR

https://code.launchpad.net/~bladernr/plainbox-provider-resource/+git/plainbox-provider-resource/+merge/327985

jobs that depend on dmi can now simply check dmi.supported == 'True' rather than a possibly changing and outdated cpuinfo.platform check for specific architectures.

To this end, any jobs (in plainbox-provider-checkbox and -resource-generic) that use DMI (and dmidecode) should use this instead of cpuinfo.platform

Ultimately, if DMI is supported, but using it fails, or casues a failure or crash, that's a bug that should be caught and handled.

so the necessary change would be changing something like this:

requires:
  package.name == 'dmidecode' or executable.name == 'dmidecode'
  cpuinfo.platform in ("i386", "x86_64")

to

requires:
  package.name == 'dmidecode' or executable.name == 'dmidecode'
  dmi.supported == 'True'

And it may be even OK to drop the package requirement since dmidecode is part of the default packages on every install that supports the package (e.g. no packages built for Power and Z).

Related branches

Jeff Lane  (bladernr)
Changed in plainbox-provider-checkbox:
importance: Undecided → Medium
Changed in plainbox-provider-resource:
importance: Undecided → Medium
Changed in plainbox-provider-checkbox:
status: New → Confirmed
Changed in plainbox-provider-resource:
status: New → Triaged
Changed in plainbox-provider-checkbox:
status: Confirmed → Triaged
milestone: none → future
Changed in plainbox-provider-resource:
milestone: none → future
Revision history for this message
Jeff Lane  (bladernr) wrote :

Paul's MR that handles the resource:
https://code.launchpad.net/~pwlars/plainbox-provider-resource/+git/plainbox-provider-resource/+merge/328045

Now jobs that previously had kludgey ways of not running on non-dmi systems should be modified to use:

dmi_present.state == 'supported'

Such as this modified version of the dmi resource job in plainbox-provider-resource

59 id: dmi
60 estimated_duration: 0.59
61 plugin: resource
62 requires:
63 - cpuinfo.platform in ("i386", "x86_64")
64 + dmi_present.state == 'supported'
65 user: root
66 command: dmi_resource
67 _summary: Collect information about hardware devices (DMI)

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

Invalid in the resource as it was already handled by Paul's MR mentioned above

Changed in plainbox-provider-resource:
status: Triaged → Fix Committed
Changed in plainbox-provider-checkbox:
status: Triaged → In Progress
Changed in plainbox-provider-resource:
status: Fix Committed → In Progress
status: In Progress → Invalid
no longer affects: plainbox-provider-resource
Changed in plainbox-provider-checkbox:
milestone: future → 0.40.0
status: In Progress → Fix Committed
Changed in plainbox-provider-checkbox:
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.