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 1631340 - Listing policy fails after adding default organization/location
Summary: Listing policy fails after adding default organization/location
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: SCAP Plugin
Version: 6.4
Hardware: x86_64
OS: All
unspecified
low
Target Milestone: Unspecified
Assignee: Ondřej Pražák
QA Contact: Sanket Jagtap
URL:
Whiteboard:
: 1632252 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-20 11:34 UTC by Ranjan Kumar
Modified: 2020-05-01 13:31 UTC (History)
4 users (show)

Fixed In Version: foreman_openscap 0.10.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-05-01 13:31:08 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 25028 0 Normal Closed Listing policy fails after adding default organization/location 2020-11-12 04:43:07 UTC

Description Ranjan Kumar 2018-09-20 11:34:12 UTC
Description of problem: After adding default organization/location, Listing policy fails with error

wrong number of arguments (given 1, expected 0)


Version-Release number of selected component (if applicable): Satellite 6.4
satellite-6.4.0-14.el7sat.noarch

How reproducible: Always

Steps to Reproduce:

[root@satellite64 ~]# hammer location list
---|------------------|------------------|------------
ID | TITLE            | NAME             | DESCRIPTION
---|------------------|------------------|------------
2  | Default Location | Default Location |            
---|------------------|------------------|------------


[root@satellite64 ~]# hammer defaults list
------------|------
PARAMETER   | VALUE
------------|------
location_id | 2    
------------|------

[root@satellite64 ~]# hammer policy list
wrong number of arguments (given 1, expected 0)

Error in production.log
--------------------
ArgumentError: wrong number of arguments (given 1, expected 0)
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_openscap-0.10.3/app/controllers/api/v2/compliance/policies_controller.rb:13:in `resource_name'
/usr/share/foreman/app/controllers/api/base_controller.rb:376:in `extract_resource_from_param'
/usr/share/foreman/app/controllers/api/base_controller.rb:357:in `block in parent_resource_details'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal/strong_parameters.rb:332:in `block in each_pair'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal/strong_parameters.rb:331:in `each_pair'
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/actionpack-5.1.6/lib/action_controller/metal/strong_parameters.rb:331:in `each_pair'
/usr/share/foreman/app/controllers/api/base_controller.rb:355:in `parent_resource_details'
/usr/share/foreman/app/controllers/api/base_controller.rb:69:in `parent_scope'
/usr/share/foreman/app/controllers/api/base_controller.rb:64:in `resource_scope'
/usr/share/foreman/app/controllers/api/base_controller.rb:104:in `resource_scope_for_index'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_openscap-0.10.3/app/controllers/api/v2/compliance/policies_controller.rb:29:in `index'

Actual results: fails with error


Expected results: should list policy


Additional info:

Comment 2 Brad Buckingham 2018-09-21 17:39:42 UTC
Hi Ranjan,

Could this be a duplicate of bug 1627679?

Comment 3 Ranjan Kumar 2018-09-22 01:19:33 UTC
No, I applied the patch mentioned in bug 1627679 but it still failed. I think the fix is required in foreman_openscap.

Comment 4 Ondřej Pražák 2018-09-25 06:27:47 UTC
*** Bug 1632252 has been marked as a duplicate of this bug. ***

Comment 5 Ondřej Pražák 2018-09-25 10:43:56 UTC
Created redmine issue http://projects.theforeman.org/issues/25028 from this bug

Comment 6 Satellite Program 2018-09-25 12:04:37 UTC
Upstream bug assigned to oprazak

Comment 7 Satellite Program 2018-09-25 12:04:41 UTC
Upstream bug assigned to oprazak

Comment 10 Satellite Program 2018-10-11 16:04:50 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25028 has been resolved.

Comment 11 Bryan Kearney 2020-05-01 13:31:08 UTC
Satellite 6.4 is now End of Life. These bus will not be fixed on the 6.4 stream. Users of Satellite should upgrade to the latest version of Satellite to get access to the most current set of bugfixes and feature improvements.


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