Hi All,
I am trying to add a qemu01, but can not find a correct way to add it into database. and the old command from Chase Qi is also failed. https://validation.linaro.org/static/docs/v2/pipeline-admin.html#updating-de... https://validation.linaro.org/static/docs/v2/first-devices.html
~# lava-server manage device-dictionary --hostname lava --import qemu01.jinja2 Unknown command: 'device-dictionary' Type 'lava-server help' for usage.
Anyone like to tell me the correct way to go down lava setup?
Thanks Alex
On Thursday 02 November 2017 08:16 AM, Alex Shi wrote:
I am trying to add a qemu01, but can not find a correct way to add it into database. and the old command from Chase Qi is also failed. https://validation.linaro.org/static/docs/v2/pipeline-admin.html#updating-de... https://validation.linaro.org/static/docs/v2/first-devices.html
~# lava-server manage device-dictionary --hostname lava --import qemu01.jinja2 Unknown command: 'device-dictionary' Type 'lava-server help' for usage.
Yes lava-server manage device-dictionary is unavailable and the documentation needs an update (I will do that shortly).
Anyone like to tell me the correct way to go down lava setup?
To add a new device use the following command:
$ sudo lava-server manage devices add --device-type lxc --description "third lxc device" --worker "harshu.stylesen.org" lxc03
To update the device dictionary there are three ways to do the same, which is explained in https://staging.validation.linaro.org/static/docs/v2/pipeline-admin.html#upd...
1) Use lava-tool device-dictionary command as follows (need to add the respective api token to use the following command):
<snip> $ sudo lava-tool device-dictionary --update /tmp/lxc.jinja2 http://stylesen@localhost/RPC2 lxc03 Updating device dictionary for lxc03 on http://stylesen@localhost/RPC2
Device dictionary updated for lxc03 </snip>
Adding API token is as follows (if required):
<snip> $ sudo lava-tool auth-add http://stylesen@localhost/RPC2 Paste token for http://stylesen@localhost/RPC2/: Token added successfully for user stylesen. </snip>
2) Copy the respective jinja2 file to /etc/lava-server/dispatcher-config/devices/
<snip> $ cat /etc/lava-server/dispatcher-config/devices/lxc03.jinja2 {% extends 'lxc.jinja2' %} {% set exclusive = True %} </snip>
3) https://validation.linaro.org/static/docs/v2/pipeline-admin.html#using-xml-r...
Thank You.
Thanks Senthil!
On 11/02/2017 11:19 AM, Senthil Kumaran S wrote:
On Thursday 02 November 2017 08:16 AM, Alex Shi wrote:
I am trying to add a qemu01, but can not find a correct way to add it into database. and the old command from Chase Qi is also failed. https://validation.linaro.org/static/docs/v2/pipeline-admin.html#updating-de... https://validation.linaro.org/static/docs/v2/first-devices.html
~# lava-server manage device-dictionary --hostname lava --import qemu01.jinja2 Unknown command: 'device-dictionary' Type 'lava-server help' for usage.
Yes lava-server manage device-dictionary is unavailable and the documentation needs an update (I will do that shortly).
Anyone like to tell me the correct way to go down lava setup?
To add a new device use the following command:
$ sudo lava-server manage devices add --device-type lxc --description "third lxc device" --worker "harshu.stylesen.org" lxc03
Could the worker be same with master machine?
To update the device dictionary there are three ways to do the same, which is explained in https://staging.validation.linaro.org/static/docs/v2/pipeline-admin.html#upd...
- Use lava-tool device-dictionary command as follows (need to add the
respective api token to use the following command):
<snip> $ sudo lava-tool device-dictionary --update /tmp/lxc.jinja2 http://stylesen@localhost/RPC2 lxc03 Updating device dictionary for lxc03 on http://stylesen@localhost/RPC2
Device dictionary updated for lxc03
</snip>
Adding API token is as follows (if required):
<snip> $ sudo lava-tool auth-add http://stylesen@localhost/RPC2 Paste token for http://stylesen@localhost/RPC2/: Token added successfully for user stylesen. </snip>
what the needed token for? and How I made it?
Sorry for much new info needed!
- Copy the respective jinja2 file to
/etc/lava-server/dispatcher-config/devices/
<snip> $ cat /etc/lava-server/dispatcher-config/devices/lxc03.jinja2 {% extends 'lxc.jinja2' %} {% set exclusive = True %} </snip>
I add a file named lxc03.jinja2 with the same contents, but how I could know it's updated or not?
And if the devices added. How I do a smoking testing to see if lava could work? especially to run lkft.
Thanks!
https://validation.linaro.org/static/docs/v2/pipeline-admin.html#using-xml-r...
Thank You.
On Thursday 02 November 2017 01:16 PM, Alex Shi wrote:
$ sudo lava-server manage devices add --device-type lxc --description "third lxc device" --worker "harshu.stylesen.org" lxc03
Could the worker be same with master machine?
Yes that is what I ve did in the above example, my worker (harshu.stylesen.org) is same as my master - this is a single node instance. To know what are the workers available visit http://localhost/scheduler/allworkers or use the following command:
<snip> $ sudo lava-server manage workers list Workers: * harshu.stylesen.org (8 devices) (master) </snip>
what the needed token for? and How I made it?
The token is the API token required in order to communicate (via lava-tool or XMLRPC) with APIs that require authentication. The tokens are available in http://localhost/api/tokens/ or alternatively can be obtained via the following command:
$ sudo lava-server manage tokens list --user stylesen
I add a file named lxc03.jinja2 with the same contents, but how I could know it's updated or not?
Visit this page http://localhost/scheduler/device/lxc03/devicedict to see if it displays some values specially for hostname or alternatively use the following command:
<snip> $ sudo lava-server manage devices details lxc03 hostname : lxc03 device_type: lxc status : Idle health : Pass health job : True description: third lxc device public : True device-dict: True worker : harshu.stylesen.org current_job: None $ </snip>
If the device dictionary is not updated then you would get something like the following:
<snip> $ sudo lava-server manage devices details lxc04 CommandError: Unable to find device 'lxc04' $ </snip>
And if the devices added. How I do a smoking testing to see if lava could work? especially to run lkft.
You can submit a job using the web UI in this URL http://localhost/scheduler/jobsubmit or use lava-tool to submit a job as follows:
$ lava-tool submit-job usage: lava-tool submit-job [-h] [--publish-artifacts] [--artifacts-url ARTIFACTS_URL] [--artifacts-path ARTIFACTS_PATH] [--block] SERVER JSON_FILE
Thank You.
Thanks a lot Senthil,
The lxc03 and qemu01 devices were added into my lava locally. Then how I kick a lfkt job for 2 devices? looks like I didn't create qemu instance or lxc instance yet, do I need to made them actually?
Thanks!
On 11/02/2017 04:22 PM, Senthil Kumaran S wrote:
And if the devices added. How I do a smoking testing to see if lava could work? especially to run lkft.
You can submit a job using the web UI in this URL http://localhost/scheduler/jobsubmit or use lava-tool to submit a job as follows:
$ lava-tool submit-job usage: lava-tool submit-job [-h] [--publish-artifacts] [--artifacts-url ARTIFACTS_URL] [--artifacts-path ARTIFACTS_PATH] [--block] SERVER JSON_FILE
Hi Alex,
On Thursday 02 November 2017 02:22 PM, Alex Shi wrote:
The lxc03 and qemu01 devices were added into my lava locally. Then how I kick a lfkt job for 2 devices? looks like I didn't create qemu instance or lxc instance yet, do I need to made them actually?
Once the devices are in place, you can go ahead with a shell script to call lava-tool submit-job twice once for qemu and for lxc.
Or,
Come up with a simple python script to submit multiple jobs based on the sample given in https://staging.validation.linaro.org/api/help/
Thank You.
On Thursday 02 November 2017 02:47 PM, Senthil Kumaran S wrote:
Come up with a simple python script to submit multiple jobs based on the sample given in https://staging.validation.linaro.org/api/help/
An example would be like this - https://gist.github.com/stylesen/6bef23bf6b090249fadfb9700ba5919c
Thank You.
Hi Senthil,
Thanks a lot for your great help! Now I submitted a lava job and start run it. Thank you very much!
Regards Alex
On 11/02/2017 05:22 PM, Senthil Kumaran S wrote:
On Thursday 02 November 2017 02:47 PM, Senthil Kumaran S wrote:
Come up with a simple python script to submit multiple jobs based on the sample given in https://staging.validation.linaro.org/api/help/
An example would be like this - https://gist.github.com/stylesen/6bef23bf6b090249fadfb9700ba5919c
Thank You.
linaro-validation@lists.linaro.org