Bug 1549123 - Targeted refresh targets can grow unbounded causing Postgres InternalError
Summary: Targeted refresh targets can grow unbounded causing Postgres InternalError
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.10.0
Assignee: Ladislav Smola
QA Contact: Matouš Mojžíš
URL:
Whiteboard: ec2:openstack:refresh
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-26 12:57 UTC by Matouš Mojžíš
Modified: 2019-08-22 00:54 UTC (History)
6 users (show)

Fixed In Version: 5.10.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-02-07 23:01:17 UTC
Category: ---
Cloudforms Team: CFME Core
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:0212 None None None 2019-02-07 23:01:24 UTC

Description Matouš Mojžíš 2018-02-26 12:57:42 UTC
Description of problem:
Same issue as in BZ linked below except for targeted refresh targets.
https://bugzilla.redhat.com/show_bug.cgi?id=1517962

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

How reproducible:
Always

Steps to Reproduce:
1.Add ec2 or openstack provider
2.Stop provider inventory role
3.Run command in rails console:
irb(main):001:0> ems = ExtManagementSystem.first; 2_000.times { ems.refresh_ems }; 
irb(main):002:0* MiqQueue.find_by(:class_name => "EmsRefresh", :method_name => "refresh", :queue_name => ems.queue_name).data.count
Result of this command should be always under 1k.

Actual results:


Expected results:


Additional info:

Comment 3 CFME Bot 2018-03-13 16:51:41 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/a22c7afc1a3957b024de903b9c11c72513c3ab22
commit a22c7afc1a3957b024de903b9c11c72513c3ab22
Author:     Ladislav Smola <lsmola@redhat.com>
AuthorDate: Tue Mar 13 10:06:33 2018 -0400
Commit:     Ladislav Smola <lsmola@redhat.com>
CommitDate: Tue Mar 13 10:06:33 2018 -0400

    Stop unbounded growth of targets

    Stop unbounded growth of targets

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

 app/models/ems_refresh.rb | 8 +-
 spec/models/ems_refresh_spec.rb | 50 +
 2 files changed, 57 insertions(+), 1 deletion(-)

Comment 4 Matouš Mojžíš 2018-08-07 14:02:39 UTC
Verified in 5.10.0.8. 
After running these commands and checking count for two days with second command:
irb(main):001:0> ems = ExtManagementSystem.first; 2_000.times { ems.refresh_ems }; 
irb(main):002:0* MiqQueue.find_by(:class_name => "EmsRefresh", :method_name => "refresh", :queue_name => ems.queue_name).data.count

count was never over 1k.

Comment 5 errata-xmlrpc 2019-02-07 23:01:17 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-2019:0212


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