Bug 1736749 - System scheduled daily chargeback reports overloads queue
Summary: System scheduled daily chargeback reports overloads queue
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.11.0
Assignee: Yuri Rudman
QA Contact: Tasos Papaioannou
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On:
Blocks: 1763862
TreeView+ depends on / blocked
 
Reported: 2019-08-01 20:50 UTC by Jared Deubel
Modified: 2023-03-24 15:09 UTC (History)
6 users (show)

Fixed In Version: 5.11.0.21
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1763862 (view as bug list)
Environment:
Last Closed: 2019-12-13 14:54:07 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jared Deubel 2019-08-01 20:50:30 UTC
Description of problem:

System scheduled daily chargeback reports overloads queue. Seeing a high number of chargeback reports for services (even retired ones).

 irb(main):043:0> MiqTask.where(["message like ? and state = ? and created_on > ?", "%chargeback%", "Queued", "2019-07-18 00:00:00"]).all.count
=> 90215

Sample queue message:

id             | 99000071458601
priority       | 100
method_name    | generate_chargeback_report
state          | ready
created_on     | 2019-07-31 00:02:17.674433
updated_on     | 2019-07-31 00:02:17.674433
lock_version   | 0
task_id        | 99000006147977
queue_name     | generic
class_name     | Service
instance_id    | 1250
args           | ---                              +
               | - :report_source: Daily scheduler+
               |   :miq_task_id:                  +
               | 
miq_callback   | ---                              +
               | :class_name: MiqTask             +
               | :instance_id: 99000006147977     +
               | :method_name: :queue_callback    +
               | :args:                           +
               | - Finished                       +
zone           | 
role           | reporting
server_guid    | 
msg_timeout    | 600
tracking_label | 99000006147977
miq_task_id    | 99000006147977

Would be nice to be able to disable this as well as scope it for the region on the global so it is not running a report for each region that is rolled up.


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

Comment 3 CFME Bot 2019-08-06 19:21:19 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/f02afae0494614730132cd587b818ba756ae82ef
commit f02afae0494614730132cd587b818ba756ae82ef
Author:     Yuri Rudman <yrudman>
AuthorDate: Tue Aug  6 08:29:57 2019 -0400
Commit:     Yuri Rudman <yrudman>
CommitDate: Tue Aug  6 08:29:57 2019 -0400

    passing first argument nil or empty string to MiqShedule will skip scheduling instead of raising error
    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1736749

 app/models/miq_schedule_worker/scheduler.rb | 6 +-
 spec/models/miq_schedule_worker/scheduler_spec.rb | 4 +-
 2 files changed, 7 insertions(+), 3 deletions(-)

Comment 5 CFME Bot 2019-08-07 22:20:35 UTC
New commit detected on ManageIQ/manageiq/ivanchuk:

https://github.com/ManageIQ/manageiq/commit/f33669afc6af838427272bed1bdf94fd889ce33e
commit f33669afc6af838427272bed1bdf94fd889ce33e
Author:     Gregg Tanzillo <gtanzill>
AuthorDate: Tue Aug  6 15:13:55 2019 -0400
Commit:     Gregg Tanzillo <gtanzill>
CommitDate: Tue Aug  6 15:13:55 2019 -0400

    Merge pull request #19105 from yrudman/pass-nil-to-miq_scheduler-to-ignore-schedule

    Allow MiqSchedule to accept nil and skip scheduling

    (cherry picked from commit 52f78217f0993eca88301e7a55475cb16b99c156)

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

 app/models/miq_schedule_worker/scheduler.rb | 6 +-
 spec/models/miq_schedule_worker/scheduler_spec.rb | 4 +-
 2 files changed, 7 insertions(+), 3 deletions(-)

Comment 6 CFME Bot 2019-08-08 22:01:06 UTC
New commit detected on ManageIQ/manageiq/ivanchuk:

https://github.com/ManageIQ/manageiq/commit/98b25ce54c302f31e3a3c7798eb045f48c1ba31f
commit 98b25ce54c302f31e3a3c7798eb045f48c1ba31f
Author:     Brandon Dunne <bdunne>
AuthorDate: Thu Aug  8 15:35:13 2019 -0400
Commit:     Brandon Dunne <bdunne>
CommitDate: Thu Aug  8 15:35:13 2019 -0400

    Merge pull request #19101 from yrudman/make-chargeback-for-service-region-aware

    Fix: make chargeback generation for service to be region aware and do not generate for retired service
    (cherry picked from commit 3bcda0474cb200acb526c8ea3be5974700a021e2)

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

 app/models/service.rb | 4 +-
 spec/models/service_spec.rb | 17 +-
 2 files changed, 18 insertions(+), 3 deletions(-)

Comment 7 Tasos Papaioannou 2019-08-19 13:33:33 UTC
The warning messages added in scheduler.rb and scheduler_spec.rb both misspell "ignored" as "ingnored".

Comment 8 Yuri Rudman 2019-08-19 17:41:25 UTC
PR to correct typo: https://github.com/ManageIQ/manageiq/pull/19166

Comment 9 CFME Bot 2019-08-19 20:20:57 UTC
New commits detected on ManageIQ/manageiq/ivanchuk:

https://github.com/ManageIQ/manageiq/commit/b39842962d49204239d9b73311f52c41432c1376
commit b39842962d49204239d9b73311f52c41432c1376
Author:     Brandon Dunne <bdunne>
AuthorDate: Mon Aug 19 13:45:54 2019 -0400
Commit:     Brandon Dunne <bdunne>
CommitDate: Mon Aug 19 13:45:54 2019 -0400

    Merge pull request #19166 from yrudman/fix-typo-in-warning-message

    Fixed typo in warning log

    (cherry picked from commit 52f50296e5aa6a3b9acae22d721dbe1e722f33ca)

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

 app/models/miq_schedule_worker/scheduler.rb | 2 +-
 spec/models/miq_schedule_worker/scheduler_spec.rb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

Comment 10 Tasos Papaioannou 2019-09-10 13:49:43 UTC
Verified on 5.11.0.21.


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