Bug 1313706

Summary: [BUG] Unable to filter content host by organization_id Description
Product: Red Hat Satellite Reporter: Akshay Mankumbare <amankumb>
Component: Hosts - ContentAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED WONTFIX QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1.7CC: dcritch, mmccune, sghai, tbrisker
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-09-04 18:05:32 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:

Description Akshay Mankumbare 2016-03-02 09:34:18 UTC
Description of problem:

Just want to create a role in which user should be able to filter content host by organization_id.

role with the following filters is created :

* lifecycle environment: all allowed, no limits
* content host: view_content_hosts, filtered by "organization_id = 1"

login with user to which roles with above filter is assigned and click on content_hosts, the spinning "loading" thing appears and stay there forever.

Below traceback is observed :
~~~~~
2016-02-26 04:51:27 [E] ActiveRecord::StatementInvalid: PGError: ERROR:  missing FROM-clause entry for table "katello_environments"
LINE 1: ...ello_systems.uuid FROM "katello_systems"  WHERE (("katello_e...
                                                             ^
: SELECT katello_systems.uuid FROM "katello_systems"  WHERE (("katello_environments"."organization_id" = '1'))
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:1158:in `async_exec'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:1158:in `exec_no_cache'
~~~~~~ 

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


How reproducible:
100%

Steps to Reproduce:
1. Create a role with following filters :
~~~
* lifecycle environment: all allowed, no limits
* content host: view_content_hosts, filtered by "organization_id = 1"
~~~~
2. Create a user.
3. Now assign above created role to a user.
4. Login to Satellite server with user and try to list content hosts

Actual results:

"loading" thing appears and stay there forever.

Below traceback is observed :
~~~~~
2016-02-26 04:51:27 [E] ActiveRecord::StatementInvalid: PGError: ERROR:  missing FROM-clause entry for table "katello_environments"
LINE 1: ...ello_systems.uuid FROM "katello_systems"  WHERE (("katello_e...
                                                             ^
: SELECT katello_systems.uuid FROM "katello_systems"  WHERE (("katello_environments"."organization_id" = '1'))
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:1158:in `async_exec'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/connection_adapters/postgresql_adapter.rb:1158:in `exec_no_cache'
~~~~~~ 


Expected results:

It should filter content hosts with organization_id = 1

Additional info:

Comment 6 Bryan Kearney 2016-07-26 15:25:24 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 7 Bryan Kearney 2016-07-26 15:34:27 UTC
Moving 6.2 bugs out to sat-backlog.

Comment 11 Bryan Kearney 2018-09-04 18:05:32 UTC
Thank you for your interest in Satellite 6. We have evaluated this request, and we do not expect this to be implemented in the product in the foreseeable future. We are therefore closing this out as WONTFIX. If you have any concerns about this, please feel free to contact Rich Jerrido or Bryan Kearney. Thank you.