Device Version Support

Registered by Andy Doan on 2012-09-10

NOTE: This BP spans at least two LAVA projects, but I think the most interesting work will take place in scheduler

The lava-dispatcher is driven by different implementation "devices" it refers to in code as "clients". For instance, we currently have a FastModel, QEMU, and MasterImage. Each of these devices is driven by some version of software (RTSM for FastModel or the master image version for MasterImage).

We are about to start needing to report the versions of these things. For different scenarios. The rough idea is that we:

1) add something to the lava_test_result "run" in the dispatcher that includes this version information
2) this then makes it to the lava-scheduler during the "on job complete" logic.
3) the "Device" model in the scheduler includes a new field for this information and gets updated
4) we add this information to the device view in LAVA

Blueprint information

Status:
Complete
Approver:
Andy Doan
Priority:
Medium
Drafter:
Andy Doan
Direction:
Approved
Assignee:
Antonio Terceiro
Definition:
Approved
Series goal:
Accepted for trunk
Implementation:
Implemented
Milestone target:
milestone icon 2012.10
Started by
Antonio Terceiro on 2012-09-20
Completed by
Fathi Boudra on 2012-10-25

Whiteboard

[doanac, 2012-09-28] re-targetted to 2012.10
[fboudra, 2012-10-25] Convert "update master image client to include version" WI to LP: #XXXXXX
[terceiro, 2012-11-27] "update master image client to include version" is LP: #1073842

Meta:
Headline: RTSM and Master Image version information now included in LAVA
Acceptance: RTSM and Master Image version are discoverable in LAVA UI

TODO list to understand the system:

- JSON schema: http://json-schema.org/
- bundle schema: http://bazaar.launchpad.net/~linaro-validation/linaro-python-dashboard-bundle/trunk/view/head:/linaro_dashboard_bundle/schemas/dashboard_bundle_format_1.3.json
- check how bundles are created by the dispatcher
- submitting a job through the scheduler:
  - apt-get install lava-dashboard-tool lava-scheduler-tool
  - steps in https://pastebin.linaro.org/925/

>> add device version as a custom attribute (alongside target.device_type, target.hostname etc)

(?)

Work Items

Work items:
update dispatcher's "lava_result" test run to include optional "device_version" field: DONE
update qemu client to include version: DONE
update fastmodel client to include version: DONE
add version field in to Device object for scheduler model: DONE
add logic to set this in the on_job_complete logic in the scheduler: DONE
display device version in the scheduler UI: DONE
merge with the (several) recent changes in the dispatcher code: DONE

This blueprint contains Public information 
Everyone can see this information.