Bug 1750924 - Report Template execution via hammer fails with "unknown parent permission"
Summary: Report Template execution via hammer fails with "unknown parent permission"
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Reporting
Version: 6.5.0
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: 6.7.0
Assignee: Marek Hulan
QA Contact: Lukáš Hellebrandt
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-10 18:46 UTC by Dylan Gross
Modified: 2023-09-07 20:35 UTC (History)
5 users (show)

Fixed In Version: foreman-1.24.0-0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-04-14 13:25:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 28167 0 Normal Closed Report Template execution via hammer fails with "unknown parent permission" 2021-01-14 14:26:53 UTC
Red Hat Product Errata RHSA-2020:1454 0 None None None 2020-04-14 13:25:49 UTC

Description Dylan Gross 2019-09-10 18:46:24 UTC
Description of problem:

  When attempting to execute a report template permission via the CLI, it fails with an error if you attempt to use "--name" of the report template:   "ERF42-5227 [Foreman::Exception]: unknown parent permission for api/v2/report_templates#generate"

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

  Red Hat Satellite 6.5.2

How reproducible:

  Always.  

Steps to Reproduce:
1.  # hammer report-template generate --name "Applicable errata" --organization myorg


Actual results:  Returns error:  ERF42-5227 [Foreman::Exception]: unknown parent permission for api/v2/report_templates#generate


Expected results:  Report is executed and out is displayed.


Additional info:

Workaround:  Specifying the ID number of the report template (from "hammer report-template list" does work).  


# hammer report-template list
----|------------------
ID  | NAME             
----|------------------
197 | Applicable errata
198 | Host statuses CSV
199 | Registered hosts 
200 | Subscriptions    
----|------------------

# hammer report-template generate --id 197
 (Resulting successful data omitted)

Comment 3 Dylan Gross 2019-09-10 18:51:31 UTC
Correction - This error is only produced if the --organization is specified.

If left off, it runs the report correctly.   Though since the "hammer report-template generate --help" shows --organization ORGANIZATION_NAME as an option, it's still a bug.

So ... 

  (works):   # hammer report-template generate --name "Applicable errata"

  (doesn't): # hammer report-template generate --name "Applicable errata" --organization myorg

Comment 6 Lukáš Hellebrandt 2019-10-17 10:29:25 UTC
Just reproduced, this is a valid bug even in 6.6.

Comment 8 Marek Hulan 2019-10-31 15:15:48 UTC
Created redmine issue https://projects.theforeman.org/issues/28167 from this bug

Comment 9 Bryan Kearney 2019-11-05 20:30:41 UTC
Upstream bug assigned to mhulan

Comment 10 Bryan Kearney 2019-11-05 20:30:42 UTC
Upstream bug assigned to mhulan

Comment 11 Bryan Kearney 2019-11-06 17:03:43 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28167 has been resolved.

Comment 13 Lukáš Hellebrandt 2019-12-05 09:24:52 UTC
Verified with Sat 6.7 snap 4.

Tried manually using reproducer from comment 3. Also, corresponding test in automation passed.

Comment 16 errata-xmlrpc 2020-04-14 13:25:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:1454


Note You need to log in before you can comment on or make changes to this bug.