Project

General

Profile

Bug #27573

API to cancel Remote Execution tasks before their scheduled time doesn't work with org/loc scope

Added by Marek Hulán about 1 month ago. Updated 30 days ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1728243

Description of problem:
Canceling REX tasks doesn't work with organization/ location scope even though help string say so.

Version-Release number of selected component (if applicable):
rubygem-foreman_maintain-0.4.4-1.el7sat.noarch

How reproducible:
always

Steps to Reproduce:
1. Schedule a future task on a remote host using org/loc tag
2. Determines task should not be executed and would like to remove it using org/loc tag.

Actual results:
Job can't be canceled.

Expected results:
Job is canceled. Or loc/org tag is removed from possible options.

Additional info:
  1. hammer job-invocation cancel --help
    Usage:
    hammer job-invocation cancel [OPTIONS]

Options:
--force FORCE One of true/false, yes/no, 1/0.
--id ID
--location-id LOCATION_ID Scope by locations
--organization-id ORGANIZATION_ID Scope by organizations
-h, --help Print help

  1. hammer v job-invocation create --start-at "$(date --utc +'%Y%m-%d %H:%M:%S' -d 'now +5 min')" --job-template "Run Command - SSH Default" --search-query "name = helpful-snipe.lxd" --inputs command="ls -la /" --organization-id 1
    Job invocation 14 created
  1. hammer job-invocation list
    ---|--------------------------------|-----------|---------|--------|---------|-------|------------------------
    ID | DESCRIPTION | STATUS | SUCCESS | FAILED | PENDING | TOTAL | START
    ---|--------------------------------|-----------|---------|--------|---------|-------|------------------------
    14 | Run ls -la / | queued | N/A | N/A | N/A | N/A | 2019-07-09 12:10:00 UTC
  1. hammer job-invocation cancel --id 14 --organization-id 1
    Could not cancel the job invocation:
    ERF42-5227 [Foreman::Exception]: unknown parent permission for api/v2/job_invocations#cancel

Associated revisions

Revision 98c4178a (diff)
Added by Adam Růžička 30 days ago

Fixes #27573 - Do not try to scope job invocations by taxonomies (#427)

History

#1 Updated by The Foreman Bot 30 days ago

  • Assignee set to Adam Ruzicka
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman_remote_execution/pull/427 added

#2 Updated by The Foreman Bot 30 days ago

  • Fixed in Releases foreman_remote_execution 1.8.3 added

#3 Updated by Adam Ruzicka 30 days ago

  • Subject changed from API to cancel Remote Execution tasks before their scheduled time doesn't work with org/loc scope to API to cancel Remote Execution tasks before their scheduled time doesn't work with org/loc scope
  • Fixed in Releases foreman_remote_execution 1.8.4 added
  • Fixed in Releases deleted (foreman_remote_execution 1.8.3)

#4 Updated by Anonymous 30 days ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF