Bug 1631379

Summary: Listing puppet classes fails after adding default organization/location
Product: Red Hat Satellite Reporter: Ranjan Kumar <rankumar>
Component: Organizations and LocationsAssignee: Sebastian Gräßl <sgraessl>
Status: CLOSED WONTFIX QA Contact: Peter Ondrejka <pondrejk>
Severity: low Docs Contact:
Priority: unspecified    
Version: 6.4CC: mhulan, mmccune, ramsingh, rankumar
Target Milestone: UnspecifiedKeywords: Regression, Triaged
Target Release: Unused   
Hardware: All   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-01 13:30:58 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ranjan Kumar 2018-09-20 12:53:37 UTC
Description of problem: After adding default organization/location, Listing puppet class fails with error

Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server's logs.

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 organization list
---|----------------------|----------------------|-------------|----------------------
ID | TITLE                | NAME                 | DESCRIPTION | LABEL                
---|----------------------|----------------------|-------------|----------------------
1  | Default Organization | Default Organization |             | Default_Organization             
---|----------------------|----------------------|-------------|----------------------

[root@satellite64 ~]# hammer defaults list
----------------|------
PARAMETER       | VALUE
----------------|------
organization_id | 1    
----------------|------

[root@satellite64 ~]# hammer puppet-class list
Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server's logsActual results:


Expected results: It should list puppet classes


Additional info: Applied the PR https://github.com/theforeman/foreman/pull/6075/files but still, this is failing.
This is working in satellite 6.3

Comment 1 Brad Buckingham 2018-09-21 17:38:47 UTC
Hi Ranjan,

Could this be a duplicate of bug 1627679?

Comment 2 Ranjan Kumar 2018-09-22 01:25:04 UTC
I applied the patch provided in bug 1627679 but didn't worked. It should be duplicate but require another another PR to fix this issue

Comment 3 Mike McCune 2018-09-25 17:08:57 UTC
This occurs for me with SNAP 23 as well.


# hammer puppet-class list
Internal Server Error: the server was unable to finish the request. This may be caused by unavailability of some required service, incorrect API call or a server-side bug. There may be more information in the server's logs.

error:

2018-09-25T13:07:59 [W|app|fa4e4] Action failed
NoMethodError: undefined method `puppetclasses' for #<Organization:0x000000000ccdd500>
/opt/theforeman/tfm-ror51/root/usr/share/gems/gems/activemodel-5.1.6/lib/active_model/attribute_methods.rb:432:in `method_missing'
/usr/share/foreman/app/controllers/api/v2/puppetclasses_controller.rb:27:in `index'

Comment 6 Marek Hulan 2018-10-02 08:15:00 UTC
Created redmine issue https://projects.theforeman.org/issues/25097 from this bug

Comment 7 Satellite Program 2018-12-11 09:11:48 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/25097 has been resolved.

Comment 9 Bryan Kearney 2020-05-01 13:30:58 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.