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 1395667 - User search using usergroup do not work
Summary: User search using usergroup do not work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Search
Version: 6.2.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: Unspecified
Assignee: Marek Hulan
QA Contact: Katello QA List
URL:
Whiteboard:
: 1400713 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-16 11:51 UTC by Roman Bobek
Modified: 2021-08-30 13:31 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 16:59:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
error message from production.log (26.95 KB, text/plain)
2016-11-16 11:51 UTC, Roman Bobek
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 17364 0 None None None 2016-11-16 14:55:54 UTC
Red Hat Knowledge Base (Solution) 3251081 0 None None None 2017-11-27 06:19:54 UTC

Description Roman Bobek 2016-11-16 11:51:33 UTC
Created attachment 1221112 [details]
error message from production.log

Description of problem:
When searching users using usergroup, Satellite returns following error:

2016-11-16 13:57:58 [app] [W] Action failed
 | ActiveRecord::StatementInvalid: PG::Error: ERROR:  column "member_type" does not exist
 | LINE 3: ...."id" = "cached_usergroup_members"."user_id"  AND member_typ...
 |                                                              ^
 | : SELECT  DISTINCT "users"."id", firstname AS alias_0 FROM "users" LEFT OUTER JOIN "cached_usergroup_members" ON "cached_usergroup_members"."user_id" = "users"."id" LEFT OUTER JOIN "usergroups" ON "usergroups"."id" = "cached_usergroup_members"."usergroup_id" LEFT OUTER JOIN "auth_sources" ON "auth_sources"."id" = "users"."auth_source_id" WHERE "users"."id" IN (4, 1, 2, 3) AND ("users"."auth_source_id" NOT IN (2)) AND (("users"."id" IN (SELECT "users"."id" FROM         "users"
 |         INNER JOIN "cached_usergroup_members"
 |         ON "users"."id" = "cached_usergroup_members"."user_id"  AND member_type = 'User'
 |         INNER JOIN "usergroups"
 |         ON "cached_usergroup_members"."usergroup_id" = "usergroups"."id"
 |  WHERE "usergroups"."name" = 'penguins' )))  ORDER BY firstname LIMIT 20 OFFSET 0
 | /opt/rh/rh-ror41/root/usr/share/gems/gems/activerecord-4.1.5/lib/active_record/connection_adapters/postgresql_adapter.rb:822:in `exec'

(full error message with ruby backtrace is enclosed to the BZ)


Version-Release number of selected component (if applicable):
Reproduced on:
* Red Hat Satellite 6.2.3
* Red Hat Satellite 6.2.4


How reproducible:
Always


Steps to Reproduce:
1. Create a usergroup (Administer > User groups > New User Group)
2. Add a user to the user group
3. Sear for users belonging to the user group (Administer > Users > enter 'usergroup = <usergroupname>' in the search field and hit search)


Actual results:
The search will fail and Satellite reports above mentioned error.


Expected results:
All users belonging to the usergroup should be listed.

Comment 1 Marek Hulan 2016-11-16 14:55:52 UTC
Created redmine issue http://projects.theforeman.org/issues/17364 from this bug

Comment 2 Bryan Kearney 2016-11-16 15:05:15 UTC
Upstream bug assigned to mhulan

Comment 3 Bryan Kearney 2016-11-16 15:05:18 UTC
Upstream bug component is Search

Comment 4 Bryan Kearney 2016-11-16 15:05:21 UTC
Upstream bug assigned to mhulan

Comment 6 Christian Marineau 2016-12-12 13:50:04 UTC
*** Bug 1400713 has been marked as a duplicate of this bug. ***

Comment 7 Bryan Kearney 2016-12-18 17:04:44 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17364 has been resolved.

Comment 10 Oleksandr Shtaier 2017-06-30 11:12:38 UTC
Verified for latest 6.3 by test automation script.

Steps:
1. Create two new users
2. Create new user group with assigned user created in previous step
3. Search for users (Administer > Users) by usergroup (usergroup = `user_group_name`)
4. Also check that no error is raised on the page

Comment 11 Bryan Kearney 2018-02-21 16:59:01 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-2018:0336


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