Bug 1253126 - ERROR -- : PG::AmbiguousColumn: ERROR: column reference "ems_id" is ambiguous LINE 1: ..."event_streams".. in provider timelines
ERROR -- : PG::AmbiguousColumn: ERROR: column reference "ems_id" is ambiguou...
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance (Show other bugs)
5.5.0
Unspecified Unspecified
medium Severity medium
: GA
: 5.5.0
Assigned To: Gregg Tanzillo
Aziza Karol
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-13 00:51 EDT by Aziza Karol
Modified: 2015-12-08 08:26 EST (History)
8 users (show)

See Also:
Fixed In Version: 5.5.0.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-08 08:26:51 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
err (66.64 KB, image/png)
2015-08-13 00:51 EDT, Aziza Karol
no flags Details

  None (edit)
Description Aziza Karol 2015-08-13 00:51:26 EDT
Created attachment 1062334 [details]
err

Description of problem:


Version-Release number of selected component (if applicable):
master.20150813005055_7bd18a8 

How reproducible:
100%

Steps to Reproduce:
1.Navigate to infrastructure->providers
2.on provider summary page click on configuration->Timelines
3.

Actual results:
 ERROR -- : PG::AmbiguousColumn: ERROR:  column reference "ems_id" is ambiguous
LINE 1: ..."event_streams"."availability_zone_id" WHERE (((( ems_id = 2...
displayed in UI. see attached screenshot

Expected results:
No error

Additional info:
evm.log:

[----] E, [2015-08-13T00:49:14.638733 #12947:1099998] ERROR -- : [ActiveRecord::StatementInvalid]: PG::AmbiguousColumn: ERROR:  column reference "ems_id" is ambiguous
LINE 1: ..."event_streams"."availability_zone_id" WHERE (((( ems_id = 2...
                                                             ^
: SELECT "event_streams"."id" AS t0_r0, "event_streams"."event_type" AS t0_r1, "event_streams"."message" AS t0_r2, "event_streams"."timestamp" AS t0_r3, "event_streams"."host_name" AS t0_r4, "event_streams"."host_id" AS t0_r5, "event_streams"."vm_name" AS t0_r6, "event_streams"."vm_location" AS t0_r7, "event_streams"."vm_or_template_id" AS t0_r8, "event_streams"."dest_host_name" AS t0_r9, "event_streams"."dest_host_id" AS t0_r10, "event_streams"."dest_vm_name" AS t0_r11, "event_streams"."dest_vm_location" AS t0_r12, "event_streams"."dest_vm_or_template_id" AS t0_r13, "event_streams"."source" AS t0_r14, "event_streams"."chain_id" AS t0_r15, "event_streams"."ems_id" AS t0_r16, "event_streams"."is_task" AS t0_r17, "event_streams"."full_data" AS t0_r18, "event_streams"."created_on" AS t0_r19, "event_streams"."username" AS t0_r20, "event_streams"."ems_cluster_id" AS t0_r21, "event_streams"."ems_cluster_name" AS t0_r22, "event_streams"."ems_cluster_uid" AS t0_r23, "event_streams"."dest_ems_cluster_id" AS t0_r24, "event_streams"."dest_ems_cluster_name" AS t0_r25, "event_streams"."dest_ems_cluster_uid" AS t0_r26, "event_streams"."availability_zone_id" AS t0_r27, "event_streams"."container_node_id" AS t0_r28, "event_streams"."container_node_name" AS t0_r29, "event_streams"."container_group_id" AS t0_r30, "event_streams"."container_group_name" AS t0_r31, "event_streams"."container_namespace" AS t0_r32, "event_streams"."type" AS t0_r33, "event_streams"."target_id" AS t0_r34, "event_streams"."target_type" AS t0_r35, "ext_management_systems"."id" AS t1_r0, "ext_management_systems"."name" AS t1_r1, "ext_management_systems"."port" AS t1_r2, "ext_management_systems"."hostname" AS t1_r3, "ext_management_systems"."ipaddress" AS t1_r4, "ext_management_systems"."created_on" AS t1_r5, "ext_management_systems"."updated_on" AS t1_r6, "ext_management_systems"."guid" AS t1_r7, "ext_management_systems"."zone_id" AS t1_r8, "ext_management_systems"."type" AS t1_r9, "ext_management_systems"."api_version" AS t1_r10, "ext_management_systems"."uid_ems" AS t1_r11, "ext_management_systems"."host_default_vnc_port_start" AS t1_r12, "ext_management_systems"."host_default_vnc_port_end" AS t1_r13, "ext_management_systems"."provider_region" AS t1_r14, "ext_management_systems"."last_refresh_error" AS t1_r15, "ext_management_systems"."last_refresh_date" AS t1_r16, "ext_management_systems"."provider_id" AS t1_r17, "ext_management_systems"."security_protocol" AS t1_r18, "ext_management_systems"."realm" AS t1_r19, "ext_management_systems"."tenant_owner_id" AS t1_r20, "availability_zones"."id" AS t2_r0, "availability_zones"."ems_id" AS t2_r1, "availability_zones"."name" AS t2_r2, "availability_zones"."ems_ref" AS t2_r3, "availability_zones"."type" AS t2_r4 FROM "event_streams" LEFT OUTER JOIN "ext_management_systems" ON "ext_management_systems"."id" = "event_streams"."ems_id" LEFT OUTER JOIN "availability_zones" ON "availability_zones"."id" = "event_streams"."availability_zone_id" WHERE (((( ems_id = 2) and (timestamp >= '2015-08-06 00:00:00.000000' and timestamp <= '2015-08-13 23:59:59.000000') and (event_type in ('AUTO_FAILED_SUSPEND_VM','AUTO_SUSPEND_VM','AUTO_SUSPEND_VM_FINISH_FAILURE','AUTO_SUSPEND_VM_FINISH_SUCCESS','DrsVmPoweredOnEvent','HOST_FAILED_TO_RUN_VMS','HOST_INITIATED_RUN_VM','HOST_INITIATED_RUN_VM_FAILED','RebootGuest_Complete','RecommendHostsForVm','RUN_VM_FAILED','SYSTEM_HOST_RESTART','SYSTEM_FAILED_HOST_RESTART','ShutdownGuest','USER_ADD_VM_STARTED','USER_FAILED_ADD_VM','USER_FAILED_HOST_RESTART','USER_FAILED_HOST_SHUTDOWN','USER_FAILED_HOST_START','USER_FAILED_HOST_STOP','USER_FAILED_PAUSE_VM','USER_FAILED_RESUME_VM','USER_FAILED_RUN_VM','USER_FAILED_SHUTDOWN_VM','USER_FAILED_STOP_VM','USER_FAILED_STOPPING_VM_INSTEAD_OF_SHUTDOWN','USER_FAILED_SUSPEND_VM','USER_HOST_MAINTENANCE','USER_HOST_RESTART','USER_HOST_SHUTDOWN','USER_HOST_START','USER_HOST_STOP','USER_INITIATED_RUN_VM','USER_INITIATED_RUN_VM_FAILED','USER_INITIATED_SHUTDOWN_VM','USER_PAUSE_VM','USER_RESUME_VM','USER_RUN_VM','USER_RUN_VM_AS_STATELESS_FINISHED_FAILURE','USER_RUN_VM_ON_NON_DEFAULT_HOST','USER_STARTED_VM','USER_STOP_VM','USER_STOP_SUSPENDED_VM','USER_STOP_SUSPENDED_VM_FAILED','USER_STOPPED_VM_INSTEAD_OF_SHUTDOWN','USER_SUSPEND_VM','USER_SUSPEND_VM_FINISH_FAILURE','USER_SUSPEND_VM_FINISH_SUCCESS','USER_SUSPEND_VM_OK','VM_DOWN','VM_DOWN_ERROR','VM_PAUSED_ENOSPC','VM_PAUSED_ERROR','VM_SHUTDOWN_FAILED','VmGuestRebootEvent','VmGuestShutdownEvent','VmPoweredOffEvent','VmPoweredOnEvent','VmResumingEvent','VmStartedOnEvent','VmStoppedEvent','VmSuspendedEvent','compute.instance.create.end','compute.instance.create.error','compute.instance.shutdown.end','compute.instance.shutdown.error','compute.instance.delete.end','compute.instance.power_off.end','compute.instance.power_on.end','compute.instance.soft_delete.end','compute.instance.reboot.end','compute.instance.suspend','compute.instance.resume','NODE_REBOOT','POD_SCHEDULED')))))  Method:[rescue in _async_generate_table]
[----] E, [2015-08-13T00:49:14.638875 #12947:1099998] ERROR -- : /opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:596:in `async_exec'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:596:in `block in exec_no_cache'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:473:in `block in log'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activesupport-4.2.3/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract_adapter.rb:467:in `log'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:596:in `exec_no_cache'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql_adapter.rb:588:in `execute_and_clear'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/postgresql/database_statements.rb:160:in `exec_query'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:351:in `select'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/database_statements.rb:32:in `select_all'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.3/lib/active_record/connection_adapters/abstract/query_cache.rb:70:in `select_all'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.3/lib/active_record/relation/finder_methods.rb:356:in `find_with_associations'
/var/www/miq/vmdb/lib/extensions/ar_virtual.rb:369:in `find_with_associations_with_virtual'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.3/lib/active_record/relation.rb:638:in `exec_queries'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.3/lib/active_record/relation.rb:514:in `load'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.3/lib/active_record/relation.rb:243:in `to_a'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/activerecord-4.2.3/lib/active_record/relation/delegation.rb:46:in `length'
/var/www/miq/vmdb/app/models/rbac.rb:260:in `find_targets_without_rbac'
/var/www/miq/vmdb/app/models/rbac.rb:255:in `find_targets_with_rbac'
/var/www/miq/vmdb/app/models/rbac.rb:417:in `search'
/var/www/miq/vmdb/app/models/miq_report/generator.rb:275:in `_generate_table'
/var/www/miq/vmdb/app/models/miq_report/generator.rb:173:in `block in generate_table'
/var/www/miq/vmdb/app/models/user.rb:330:in `with_userid'
/var/www/miq/vmdb/app/models/miq_report/generator.rb:173:in `generate_table'
/var/www/miq/vmdb/app/models/miq_report/generator/async.rb:93:in `_async_generate_table'
/var/www/miq/vmdb/app/models/miq_report/generator/async.rb:42:in `_async_generate_table'
/var/www/miq/vmdb/app/models/miq_queue.rb:345:in `block in deliver'
/opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/timeout.rb:89:in `block in timeout'
/opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/timeout.rb:34:in `block in catch'
/opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/timeout.rb:34:in `catch'
/opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/timeout.rb:34:in `catch'
/opt/rubies/ruby-2.2.2/lib/ruby/2.2.0/timeout.rb:104:in `timeout'
/var/www/miq/vmdb/app/models/miq_queue.rb:341:in `deliver'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:107:in `deliver_queue_message'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:135:in `deliver_message'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:152:in `block in do_work'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:146:in `loop'
/var/www/miq/vmdb/lib/workers/queue_worker_base.rb:146:in `do_work'
/var/www/miq/vmdb/lib/workers/worker_base.rb:328:in `block in do_work_loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:325:in `loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:325:in `do_work_loop'
/var/www/miq/vmdb/lib/workers/worker_base.rb:146:in `run'
/var/www/miq/vmdb/lib/workers/worker_base.rb:127:in `start'
/var/www/miq/vmdb/lib/workers/worker_base.rb:24:in `start_worker'
/var/www/miq/vmdb/lib/workers/bin/worker.rb:3:in `<top (required)>'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands/runner.rb:60:in `load'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands/runner.rb:60:in `<top (required)>'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:123:in `require'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:123:in `require_command!'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:90:in `runner'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands/commands_tasks.rb:39:in `run_command!'
/opt/rubies/ruby-2.2.2/lib/ruby/gems/2.2.0/gems/railties-4.2.3/lib/rails/commands.rb:17:in `<top (required)>'
/var/www/miq/vmdb/bin/rails:4:in `require'
/var/www/miq/vmdb/bin/rails:4:in `<main>'
Comment 1 Aziza Karol 2015-08-13 00:53:51 EDT
Github link -https://github.com/ManageIQ/manageiq/issues/3829
Comment 3 Gregg Tanzillo 2015-08-24 12:03:40 EDT
PR: https://github.com/ManageIQ/manageiq/pull/3939
Comment 4 Aziza Karol 2015-11-16 01:02:31 EST
No error when clicked on provider timelines.

Verified:5.5.0.10-beta2.1.20151110134042_d6f5459
Comment 6 errata-xmlrpc 2015-12-08 08:26:51 EST
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-2015:2551

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