Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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: 2024-06-13 22:14 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.