Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

run -j option fails to find unique job by name

#385

the run -j group/name option fails if multiple jobs match the specified job name, even if only one job has the exact job name.

e.g.

Venkman:test greg$ tools/bin/run -j 'test' 
# No project specified, defaulting to: test
Error: Failed request to run a job: Job not was not unique: /test: 5 jobs found

when rd-jobs lists only a single job with the exact name "test":

Venkman:test greg$ tools/bin/rd-jobs list
# No project specified, defaulting to: test
# Found 6 jobs:
- asdf
- test - 'test update redirect'
- test2 - 'test update redirect'
- uuidmodify test - 'asdf'
- uuidmodify test2 - 'asdffdd'
- uuidmodify test3 - 'asdf'

workaround: determine id via rd-jobs, and use -i option

fix: the RunDeck API needs to allow exact equality query for job name, and the CLI tool needs to use this query filter

Reported by Greg Schueler · July 12th, 2011 @ 05:29 PM

State: resolved
Milestone: Rundeck 1.3
Assigned to: Greg Schueler Greg Schueler

Activity

  1. Deleted User
    Deleted User
    • State changed from new to needs_verification

    (from [7326a96529bc10deca1acdedf5724f065ab09609]) Add exact job name and group filter parameters for jobs query api, update run tool usage, update tests and docs [#385 run -j option fails to find unique job by name state:needs_verification] https://github.com/dtolabs/rundeck/commit/7326a96529bc10deca1acdedf...

    July 12th, 2011 @ 08:01 PM

  2. Alex-SF
    Alex-SF

    This fails as expected...

    $ run -j norestest # No project specified, defaulting to: examples
    Error: Failed request to run a job: Job was not unique: /norestest: 2 jobs found: [2b87983b-a47a-4d77-82a9-8d69cde199f1, 03a50f6b-1570-429c-b337-b8fd051ab0ae]
    

    ... given the following jobs ...

    $ rd-jobs 
    # No project specified, defaulting to: examples
    # Found 2 jobs:
    - norestest
    - blar/norestest
    

    ... but can't seem to run the "norestest" job with new group name

    July 14th, 2011 @ 01:10 PM

  3. Alex-SF
    Alex-SF
    • State changed from needs_verification to open

    July 14th, 2011 @ 01:10 PM

  4. Greg Schueler
    Greg Schueler
    • State changed from open to needs_verification

    July 14th, 2011 @ 03:53 PM

  5. Greg Schueler
    Greg Schueler

    updated behavior of -j flag,

    -j "job name" -- this will match a job named "job name" at the top level same thing with -j "/job name"

    July 14th, 2011 @ 03:56 PM

  6. Alex-SF
    Alex-SF
    • State changed from needs_verification to resolved

    July 15th, 2011 @ 11:06 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.