Bug 867561

Summary: help section of job-cancel and job-delete does not have usage examples
Product: [Retired] Beaker Reporter: Michael Gregg <mgregg>
Component: command lineAssignee: Dan Callaghan <dcallagh>
Status: CLOSED CURRENTRELEASE QA Contact: tools-bugs <tools-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 0.9CC: asaha, bpeck, dcallagh, jgalipea, mishin, rglasz, rmancy, xma
Target Milestone: 0.18.2Keywords: Patch, Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-07 07:19:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michael Gregg 2012-10-17 18:09:14 UTC
Description of problem:
Including a usage example for bkr job-cancel and bkr job-delete would be very helpful.
When running job cancel and job delete, the job ID needs to be specified with "J:" before the job ID. This is not clear from the help section. 

There is a example in the man page for both commands, but a example in the cli help would be nice.

Version-Release number of selected component (if applicable):
0.8.1-6

How reproducible:
always

Steps to Reproduce:
1. bkr job-cancel <number> (ie bkr-job-cancel 33471)
  

Actual results:
bkr job-cancel 33471
XML-RPC fault: <type 'exceptions.ValueError'>:need more than 1 value to unpack

Expected results:
bkr job-cancel 33471
XML-RPC fault: <type 'exceptions.ValueError'>:need more than 1 value to unpack
Did you specify the job ID properly? Example J:1234

Comment 1 Dan Callaghan 2012-10-17 22:14:55 UTC
Michael, this has been addressed quite a while ago. Your client version if very old, please upgrade to the latest version.

$ bkr job-cancel 1234
Usage: bkr job-cancel [options] <taskspec>...

bkr: error: Invalid taskspec '1234': see "Specifying tasks" in bkr(1)

*** This bug has been marked as a duplicate of bug 595512 ***

Comment 4 Bill Peck 2014-04-14 13:36:58 UTC
job-cancel fails if you specify R:<number>.  Either the help should be updated to specify that only J:<number> and RS:<number> are valid or the command should can the recipeSet when R:<number> is specified.

Comment 5 Bill Peck 2014-04-14 13:37:32 UTC
(In reply to Bill Peck from comment #4)
> job-cancel fails if you specify R:<number>.  Either the help should be
> updated to specify that only J:<number> and RS:<number> are valid or the
> command should can the recipeSet when R:<number> is specified.

                  ^^
                 cancel

Comment 8 Dan Callaghan 2014-09-17 06:59:21 UTC
http://gerrit.beaker-project.org/3333

$ bkr job-cancel R:123
Usage: bkr job-cancel [options] [J:<id> | RS:<id> ...]

bkr: error: Taskspec type must be one of [J, RS, T]

T is in there because we allow cancelling individual recipe-tasks (bug 1124756) even though it's not documented...

Comment 11 Dan Callaghan 2014-10-07 07:19:50 UTC
Beaker 0.18.2 has been released.