some resources show "not-supported" when they shouldn't

Bug #1301895 reported by Daniel Manrique
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox
Fix Released
Critical
Zygmunt Krynicki
Checkbox Provider - Resource
Fix Released
Critical
Zygmunt Krynicki

Bug Description

I installed the latest set of packages from the PPA to test c-d-t-s. This problem seems related to the new resource provider which has a new layout and possibly some other changes. Versions are:

Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-============================================-===========================-===========================-=============================================================================================
ii checkbox-gui 0.17.6-0ubuntu5 amd64 QML based interface for system testing based on Plainbox.
ii checkbox-ng 0.3~dev+bzr2869+pkg1~ubuntu all PlainBox based test runner
ii checkbox-ng-service 0.3~dev+bzr2869+pkg1~ubuntu all CheckBox D-Bus service
ii plainbox 0.6~dev+bzr2869+pkg2~ubuntu all toolkit for software and hardware integration testing
ii plainbox-provider-canonical-driver-test-suit 1.7+bzr2368+bzr68~ubuntu14. all Tool for testing driver compatibility with Ubuntu.
ii plainbox-provider-checkbox 0.4~dev+bzr2869+pkg1~ubuntu amd64 CheckBox provider for PlainBox
ii plainbox-provider-resource-generic 0.3~dev+bzr2869+pkg3~ubuntu amd64 CheckBox generic resource jobs provider
ii plainbox-secure-policy 0.6~dev+bzr2869+pkg2~ubuntu all policykit policy required to use plainbox (secure version)
ii python3-checkbox-ng 0.3~dev+bzr2869+pkg1~ubuntu all PlainBox based test runner (Python 3 library)
ii python3-checkbox-support 0.2~dev+bzr2869+pkg1~ubuntu all collection of Python modules used by PlainBox providers
ii python3-plainbox 0.6~dev+bzr2869+pkg2~ubuntu all toolkit for software and hardware testing (python3 module)

Running c-d-t-s and trying to generate a report failed with some error about not finding a "name" key in packages. Also a couple of the required resources failed bogusly as their requirements do exist on the system.

Running this:

$ plainbox run -i .*miscellanea/submission-resources.*

Ultimately results in this, notice the not-supported resources:

==================================[ Results ]===================================
2013.com.canonical.certification::cpuinfo: pass
2013.com.canonical.certification::dmi_attachment: fail
2013.com.canonical.certification::dpkg: not-supported
2013.com.canonical.certification::lsb: not-supported
2013.com.canonical.certification::miscellanea/submission-resources: not-supported
2013.com.canonical.certification::package: pass
2013.com.canonical.certification::requirements: fail
2013.com.canonical.certification::sysfs_attachment: pass
2013.com.canonical.certification::udev_attachment: pass
2013.com.canonical.certification::uname: pass

The job definitions (now living in /usr/share/2013.com.canonical.certification\:plainbox-resources) show this:

id: dpkg
estimated_duration: 0.19
plugin: resource
command: dpkg_resource
requires: package.name == "dpkg"
_description: Gets info on the version of dpkg installed

id: lsb
estimated_duration: 1.63
plugin: resource
command: lsb_resource
requires: package.name == "lsb-release"
_description: Generates release info based on /etc/lsb-release

both lsb-release and dpkg *are* installed on the target system.

Trying to save this to xml ($ plainbox run -i .*miscellanea/submission-resources.* -f xml) exposes the xml exporter crash (let me know if you want this on a separate bug):
CRITICAL plainbox.crashes: Executable 'plainbox' invoked with Namespace(command=<plainbox.impl.commands.run.RunCommand object at 0x7f834e850128>, debug_console=False, debug_interrupt=False, dry_run=False, exclude_pattern_list=[], include_pattern_list=['.*miscellanea/submission-resources.*'], log_level=None, not_interactive=False, output_file=<_io.TextIOWrapper name='<stdout>' mode='w' encoding='UTF-8'>, output_format='xml', output_options='', pdb=False, providers=None, trace=[], transport=None, transport_options=None, transport_where=None, whitelist=[]) has crashed
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/plainbox/impl/clitools.py", line 513, in dispatch_and_catch_exceptions
    return self.dispatch_command(ns)
  File "/usr/lib/python3/dist-packages/plainbox/impl/clitools.py", line 509, in dispatch_command
    return ns.command.invoked(ns)
  File "/usr/lib/python3/dist-packages/plainbox/impl/commands/run.py", line 384, in invoked
    return RunInvocation(self.provider_list, self.config, ns).run()
  File "/usr/lib/python3/dist-packages/plainbox/impl/commands/run.py", line 87, in run
    return self._run_jobs(ns, job_list, exporter, transport)
  File "/usr/lib/python3/dist-packages/plainbox/impl/commands/run.py", line 207, in _run_jobs
    exporter.dump(data_subset, exported_stream)
  File "/usr/lib/python3/dist-packages/plainbox/impl/exporter/xml.py", line 188, in dump
    root = self.get_root_element(data)
  File "/usr/lib/python3/dist-packages/plainbox/impl/exporter/xml.py", line 213, in get_root_element
    self._add_software(root, data)
  File "/usr/lib/python3/dist-packages/plainbox/impl/exporter/xml.py", line 377, in _add_software
    ("name", package_dict["name"]))))
KeyError: 'name'

I need to set this as critical since inability to generate the reports blocks pretty much every legitimate use of these tools.

Tags: plainbox

Related branches

Chris Gregan (cgregan)
Changed in checkbox:
status: New → Confirmed
assignee: nobody → Zygmunt Krynicki (zkrynicki)
Chris Gregan (cgregan)
Changed in checkbox-ihv-ng:
status: New → Confirmed
importance: Undecided → Critical
assignee: nobody → Daniel Manrique (roadmr)
milestone: none → version1.8
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

The culprit: dpkg-query -W -f='id: ${Package}\nversion: ${Version}\n\n'

name changed to id

Zygmunt Krynicki (zyga)
Changed in checkbox:
status: Confirmed → Fix Committed
status: Fix Committed → Fix Released
Daniel Manrique (roadmr)
Changed in checkbox-ihv-ng:
status: Confirmed → Fix Committed
Changed in checkbox:
milestone: none → plainbox-0.6
Revision history for this message
Zygmunt Krynicki (zyga) wrote : Re: [Bug 1301895] Re: some resources show "not-supported" when they shouldn't

I think this will be plainbox-provider-resource 0.3, this is not a plainbox
bug

On Thu, Apr 3, 2014 at 3:29 PM, Daniel Manrique <
<email address hidden>> wrote:

> ** Changed in: checkbox-ihv-ng
> Status: Confirmed => Fix Committed
>
> ** Changed in: checkbox
> Milestone: None => plainbox-0.6
>
> --
> You received this bug notification because you are a member of Checkbox
> Bug Wranglers, which is subscribed to checkbox.
> https://bugs.launchpad.net/bugs/1301895
>
> Title:
> some resources show "not-supported" when they shouldn't
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/checkbox/+bug/1301895/+subscriptions
>

Zygmunt Krynicki (zyga)
Changed in plainbox-provider-resource:
milestone: none → 0.3
importance: Undecided → Critical
status: New → Fix Committed
assignee: nobody → Zygmunt Krynicki (zkrynicki)
Changed in checkbox:
milestone: plainbox-0.6 → none
Zygmunt Krynicki (zyga)
Changed in plainbox-provider-resource:
status: Fix Committed → Fix Released
Chris Gregan (cgregan)
Changed in checkbox-ihv-ng:
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.