Bug 1528559

Summary: Unable to show policy event on nova's timeline
Product: Red Hat CloudForms Management Engine Reporter: Imaan <ikaur>
Component: ApplianceAssignee: Gregg Tanzillo <gtanzill>
Status: CLOSED DUPLICATE QA Contact: Dave Johnson <dajohnso>
Severity: low Docs Contact:
Priority: low    
Version: 5.8.0CC: abellott, cpelland, gblomqui, gtanzill, hkataria, ikaur, izapolsk, lavenel, mpovolny, obarenbo, sacpatil
Target Milestone: GA   
Target Release: cfme-future   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-01-03 15:10:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Attachments:
Description Flags
image describe about policy options none

Description Imaan 2017-12-22 06:26:37 UTC
Created attachment 1371204 [details]
image describe about policy options

Description of problem:

Getting error "PG::UndefinedColumn: ERROR: column policy_events.availability_zone_id does not exist" while performing policy_event on nova's timeline. 

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

5.8.2.3.20171016155816_aaec796

How reproducible:

Always

Steps to Reproduce:

1. Login to Operational portal of CloudForms.

2. Navigate to Compute -> Clouds -> Availability Zones -> Monitoring ->  Timelines -> Select Policy Event -> Select all -> Both (radio button) --(Refer policy.png)

3. Click on apply. 

4. You will get above mentioned error.

Actual results:

Not able to get policy event on nova timeline.

Expected results:

CloudForms should display policy event on nova timeline.

Additional info:

evm.log:

[----] I, [2017-12-21T13:36:04.217479 #2217:3bd8564]  INFO -- :   Parameters: {"tl_show"=>"policy_timeline", "tl_categories"=>["Authentication Validation", "CFME Operation", "Company Tag", "Compliance", "Container Operation", "Datastore Operation", "Host Operation", "Orchestration Lifecycle", "Provider Operation", "Service Lifecycle", "VM Configuration", "VM Lifecycle", "VM Operation"], "tl_timerange"=>"weeks", "tl_timepivot"=>"ending", "tl_result"=>"both", "tl_range_count"=>"1", "tl_date"=>"Fri Dec 22 2017 00:00:00 GMT+0530 (IST)", "tl_typ"=>"Daily", "tl_days"=>"7", "miq_date"=>"12/22/2017", "id"=>"39000000000001"}
[----] F, [2017-12-21T13:36:04.230975 #2217:3bd8564] FATAL -- : Error caught: [ActiveRecord::StatementInvalid] PG::UndefinedColumn: ERROR:  column policy_events.availability_zone_id does not exist
LINE 1: ...CT  "policy_events".* FROM "policy_events" WHERE (policy_eve...
                                                             ^
: SELECT  "policy_events".* FROM "policy_events" WHERE (policy_events.availability_zone_id = 39000000000001) ORDER BY timestamp ASC LIMIT $1

Comment 2 Gregg Tanzillo 2018-01-03 14:44:59 UTC
It looks like the timeline is attempting to query policy events with availability_zone. However, there is no availability_zone_id in that table (policy_events)

Is the log with the full backtrace available so that we can see where this query is originating?

Comment 3 Greg Blomquist 2018-01-03 15:10:34 UTC

*** This bug has been marked as a duplicate of bug 1523663 ***