lava-tool did not show job-output

Bug #1174626 reported by Naresh Kamboju
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
LAVA Tool
Fix Released
Low
Antonio Terceiro

Bug Description

I have downloaded and installed the latest source from bzr
 * lava-tool
 * lava-scheduler-tool

I did not found Job-output in lava-tool

naresh@Linaro:~/get-job-file/lava-tool$ lava-tool --help
usage: lava-tool [-h] {auth-add,help,submit-job,resubmit-job,cancel-job} ...

optional arguments:
  -h, --help show this help message and exit

Sub-command to invoke:
  {auth-add,help,submit-job,resubmit-job,cancel-job}
    auth-add Add an authentication token.
    help Show a summary of all available commands
    submit-job Submit a job to lava-scheduler
    resubmit-job
    cancel-job

complete test log:
https://pastebin.linaro.org/view/057b8d31

Revision history for this message
Senthil Kumaran S (stylesen) wrote :

The new command for getting job output is added as part of lava-scheduler-tool. Will provide a detailed text on how to install it in a new ubuntu box shortly.

Changed in lava-tool:
assignee: nobody → Senthil Kumaran S (stylesen)
importance: Undecided → Low
status: New → In Progress
Revision history for this message
Antonio Terceiro (terceiro) wrote : Re: [Bug 1174626] Re: lava-tool did not show job-output

Senthil, it looks like you forgot to add `job-output` as a subcommand of
`lava-tool`, and just added it as a subcommand of `lava scheduler`.

$ lava-tool job-output
usage: lava-tool [-h] {auth-add,submit-job,help,cancel-job,resubmit-job} ...
lava-tool: error: invalid choice: 'job-output' (choose from 'auth-add', 'submit-job', 'help', 'cancel-job', 'resubmit-job')
$ lava scheduler job-output
usage: lava scheduler job-output [-h] [--overwrite] [--output OUTPUT]
                                 SERVER JOB_ID
lava scheduler job-output: error: too few arguments

Revision history for this message
Antonio Terceiro (terceiro) wrote :

I'm adding `job-output` to lava-tool as well, and will do a pypi release soon.

Naresh, please note that when I do the release, you will not need to install lava-scheduler-tool anymore, since it will be included in lava-tool from now on.

Thanks

Changed in lava-tool:
assignee: Senthil Kumaran S (stylesen) → Antonio Terceiro (terceiro)
Revision history for this message
Antonio Terceiro (terceiro) wrote :

ok, so if you install lava-tool from pypi now, you will get `job-ouput` as well.

Changed in lava-tool:
status: In Progress → Fix Released
Revision history for this message
Senthil Kumaran S (stylesen) wrote :

With latest changes from antonio, following is how we use the job-output option in lava-tool:

$ sudo apt-get install python-pip #if pip is not already installed

$ sudo pip uninstall -v lava-tool -V 0.6

$ sudo pip uninstall -v lava-tool -V 0.7 #to cleanup previous installations

$ sudo pip install -v lava-tool #install latest lava-tool

$ lava-tool
usage: lava-tool [-h]
                 {job-output,help,auth-add,cancel-job,resubmit-job,submit-job}
                 ...
lava-tool: error: too few arguments

$ lava-tool job-output https://<email address hidden>/lava-server/RPC2/ 50000
ERROR: Username provided but no token found.

$ lava-tool auth-add https://<email address hidden>/lava-server/RPC2/
Paste token for https://<email address hidden>/lava-server/RPC2/:
Token added successfully for user stylesen.

$ lava-tool job-output https://<email address hidden>/lava-server/RPC2/ 50000
Downloaded job output of 50000 to file '50000_output.txt'

$ lava-tool job-output https://<email address hidden>/lava-server/RPC2/ 50000 -o new_job_output.txt
Downloaded job output of 50000 to file 'new_job_output.txt'

$ ls -alh 50000_output.txt new_job_output.txt
-rw-rw-r-- 1 stylesen stylesen 134K May 2 12:18 50000_output.txt
-rw-rw-r-- 1 stylesen stylesen 134K May 2 12:19 new_job_output.txt

Revision history for this message
Naresh Kamboju (naresh-kamboju) wrote :

I have followed above steps and successfully download job-output.

$ lava-tool auth-add http://<email address hidden>/lava-server/RPC2/
Paste token for http://<email address hidden>/lava-server/RPC2/:
Token added successfully for user naresh-kamboju.

$ lava-tool job-output http://<email address hidden>/lava-server/RPC2/ 51265
Downloaded job output of 51265 to file '51265_output.txt'

$ ll -h 51265_output.txt
-rw-rw-r-- 1 naresh naresh 485K May 2 17:18 51265_output.txt

Best regards
Naresh Kamboju

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.