Bug 1354629

Summary: Scheduled reports are emailing ever few seconds rather then just 1
Product: Red Hat CloudForms Management Engine Reporter: Colin Arnott <carnott>
Component: ReportingAssignee: Joe Rafaniello <jrafanie>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Stefanisin <jistefan>
Severity: high Docs Contact:
Priority: high    
Version: 5.5.0CC: benglish, cpelland, dajohnso, jhardy, jistefan, jrafanie, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.7.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: 5.7.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1360330 1360332 (view as bug list) Environment:
Last Closed: 2017-01-11 20:19:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1360330, 1360332    

Description Colin Arnott 2016-07-11 19:27:16 UTC
Description of problem:
When my monthly scheduled report is set to run, it should email that report once, but instead it appears to get stuck in a loop and emails the report sixty times.

Version-Release number of selected component (if applicable):
cfme-5.6.0.13-1.el7cf.x86_64

How reproducible:
trivial

Steps to Reproduce:
1. add a monthly schedule (any number of months as the interval) to a report
2. wait for it to trigger

Actual results:
get 60 reports generated

Expected results:
have the report run once

Comment 5 Joe Rafaniello 2016-08-01 14:10:25 UTC
https://github.com/ManageIQ/manageiq/pull/10129

New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/85c117362f898d357d7a02377e9f82f4a17f3a61

commit 85c117362f898d357d7a02377e9f82f4a17f3a61
Author:     d-m-u <duhlmann>
AuthorDate: Thu Jul 28 17:29:19 2016 -0400
Commit:     d-m-u <duhlmann>
CommitDate: Thu Jul 28 17:29:19 2016 -0400

    Avoid issue with Rufus caching time within options
    
    Rufus scheduler 3.0.8+ started modifying the input options hash at
    jmettraux/rufus-scheduler@c074a59
    
    This commit allows schedules to parse the time using Chronic.
    Unfortunately, for speed, they cache the result of the first parse in the
    input options hash, causing us to schedule the same time many times!
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1360332

 app/models/miq_schedule_worker/runner.rb       | 4 ++--
 spec/models/miq_schedule_worker/runner_spec.rb | 3 +++
 2 files changed, 5 insertions(+), 2 deletions(-)

Comment 6 Jiri Stefanisin 2016-09-20 09:55:40 UTC
Verified on 5.7.0.0.20160906172503_12f65cb.