Bug 1641810 - undefined method `find_tagged_with' for #<Class:0x000000000b5e3228> [miq_request/show_list]
Summary: undefined method `find_tagged_with' for #<Class:0x000000000b5e3228> [miq_requ...
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.9.4
Hardware: Unspecified
OS: Unspecified
Target Milestone: GA
: 5.9.5
Assignee: Joe Rafaniello
QA Contact: Shveta
Red Hat CloudForms Documentation
Depends On: 1641012
TreeView+ depends on / blocked
Reported: 2018-10-22 20:25 UTC by Satoe Imaishi
Modified: 2018-12-03 13:36 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1641012
Last Closed: 2018-11-05 14:00:33 UTC
Category: ---
Cloudforms Team: ---

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:3466 None None None 2018-11-05 14:00:54 UTC

Comment 2 CFME Bot 2018-10-22 20:30:50 UTC
New commit detected on ManageIQ/manageiq/gaprindashvili:

commit 256263f4d31da72725f0aaa7362ac55f7c5b12a0
Author:     Joe Rafaniello <jrafanie@users.noreply.github.com>
AuthorDate: Mon Oct 22 11:26:24 2018 -0400
Commit:     Joe Rafaniello <jrafanie@users.noreply.github.com>
CommitDate: Mon Oct 22 11:26:24 2018 -0400

    Merge pull request #18114 from gtanzillo/fix-tag-expression-on-not-taggable-class

    Check if class is taggable before attempting to process tag expression

    (cherry picked from commit 6fa29c26a8dbb3c8935dfc4d521b6971073d3655)

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1641810

 lib/rbac/filterer.rb | 2 +-
 spec/lib/rbac/filterer_spec.rb | 18 +
 2 files changed, 19 insertions(+), 1 deletion(-)

Comment 3 Shveta 2018-10-25 16:54:17 UTC
Hi , 

I have set up an appliance 
Restored DB . 
Service - request does not show any requests.
I ordered one request and it is showing fine .
Please check once .


Comment 4 Joe Rafaniello 2018-10-29 11:20:26 UTC
> Restored DB . 
Service - request does not show any requests.
I ordered one request and it is showing fine .

Hi Shveta,

Login as admin and verify which user role has the managed/tag filter that contains a tag expression.  Create a user for yourself that has this role and then try to login as them.  Then, if you have requests in your database, if you go to services -> requests, this page will fail to load with an error (before the fix).  Once that is verified, try it on the fixed version, it should load with no issues.

I'll be online in a few hours if you have any questions.  Please contact me on gitter or ask me here.  Thanks!


Comment 5 Shveta 2018-10-29 20:08:10 UTC
Please have a look at
Getting error while restoring DB .

Comment 6 Gregg Tanzillo 2018-10-30 12:44:53 UTC
Hi Shveta, Looking at the pastebin, it seems that the error you are getting during the restore is due to the fact that the DB has open connections -

pg_restore: [archiver (db)] could not execute query: ERROR:  cannot drop the currently open database
    Command was: DROP DATABASE vmdb_production;

After that there are errors/warnings on every table it tries to restore.

You need to make sure that all connections are closed before attemting to drop and restore the DB

Comment 7 Joe Rafaniello 2018-10-30 13:55:09 UTC
Hi Shveta, I posted this directly to you but will copy this here.  The steps for this BZ are causing you to hit numerous errors. One, what GreggT posted in comment #6.  Also, you're hitting the issue during fix_auth being looked at in bug #1643250.

While, it would be great to be able to use this exact database to recreate the problem and then verify the new build fixes it, it's not necessary.

You can do one of the following:
1) Use an existing database export containing services and a user role with a tag filter (Managed -> environment -> production) that does get through fix_auth... or

2) Take an empty database.  Create a new user role, from an existing one, add a Managed -> environment -> production tag for that user role, assign a group to this role, and add a user into this group.  As an admin, create a request, such as a provision request, then try to login as the user with this production tag.  With the old codebase, if you go to requests, it will blow up with the reported find_tagged_with error.  With the fixed code, it will show the request, since requests don't participate in tag based filtering.

Comment 8 Joe Rafaniello 2018-10-30 13:56:44 UTC
Part 1) should say "Use an existing database export containing requests"... not services

Comment 9 Joe Rafaniello 2018-10-30 13:58:29 UTC
We can continue to investigate the issues you're having with this specific database export outside of this bugzilla.

Comment 10 Shveta 2018-10-30 17:22:10 UTC
Hi Joe , 

Verified this BZ with the steps in part 2 mentioned above.
Appliance -
Verison - 
Created a role bz_role in appliance .
Created a group tagged with Environment- Production .
User belonging to that group .
Created request .
Logged in as user , request shows without error .
Please take a look once before I move it to verified .

Comment 11 Joe Rafaniello 2018-10-30 17:50:30 UTC
That looks good to me Shveta

Comment 13 errata-xmlrpc 2018-11-05 14:00:33 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.


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