Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1171343 - Deleting a Cluster with many policy_events takes forever and times out.
Deleting a Cluster with many policy_events takes forever and times out.
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance (Show other bugs)
5.2.0
All All
urgent Severity urgent
: GA
: 5.3.2
Assigned To: Jason Frey
Dave Johnson
: ZStream
Depends On: 1167110
Blocks:
  Show dependency treegraph
 
Reported: 2014-12-05 17:39 EST by Dave Johnson
Modified: 2015-03-23 10:49 EDT (History)
9 users (show)

See Also:
Fixed In Version: 5.3.2
Doc Type: Bug Fix
Doc Text:
Policy_events are not allowing the cluster to delete and the operation times out. Added purger for policy_events - PurgerMixin has been created as a set of common methods from all of the other purgers. Also added scheduler methods for purging policy_events. These changes have now resolved the issue and there is no longer a timeout.
Story Points: ---
Clone Of: 1167110
Environment:
Last Closed: 2015-01-14 14:44:10 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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2015:0028 normal SHIPPED_LIVE Important: cfme security, bug fix, and enhancement update 2015-01-14 19:41:27 EST

  None (edit)
Comment 1 CFME Bot 2014-12-05 17:51:15 EST
New commit detected on cfme/5.3.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=d2f012392e19f165c673e5a8aaf93a2ad740f67b

commit d2f012392e19f165c673e5a8aaf93a2ad740f67b
Author:     Jason Frey <jfrey@redhat.com>
AuthorDate: Mon Nov 24 16:51:10 2014 -0500
Commit:     Jason Frey <jfrey@redhat.com>
CommitDate: Fri Dec 5 17:48:11 2014 -0500

    Remove :dependent => :nullify for policy_events.
    
    policy_events will be handled by a purger much like ems_events.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1167110
    https://bugzilla.redhat.com/show_bug.cgi?id=1171343

 vmdb/app/models/ems_cluster.rb           | 2 +-
 vmdb/app/models/ext_management_system.rb | 2 +-
 vmdb/app/models/host.rb                  | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
Comment 2 CFME Bot 2014-12-05 17:51:28 EST
New commit detected on cfme/5.3.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=11c33f0f275b2fcf9de22ee7246712726bb38b1d

commit 11c33f0f275b2fcf9de22ee7246712726bb38b1d
Author:     Jason Frey <jfrey@redhat.com>
AuthorDate: Mon Nov 24 16:56:05 2014 -0500
Commit:     Jason Frey <jfrey@redhat.com>
CommitDate: Fri Dec 5 17:48:23 2014 -0500

    Added scheduler methods for purging policy_events.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1167110
    https://bugzilla.redhat.com/show_bug.cgi?id=1171343

 vmdb/config/vmdb.tmpl.yml                     |  1 +
 vmdb/lib/workers/schedule_worker.rb           |  6 ++++++
 vmdb/lib/workers/schedule_worker/jobs.rb      | 18 ++++++++++++------
 vmdb/spec/lib/workers/schedule_worker_spec.rb | 19 ++++++++++---------
 4 files changed, 29 insertions(+), 15 deletions(-)
Comment 3 CFME Bot 2014-12-05 17:51:39 EST
New commit detected on cfme/5.3.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=b4484b6674388904fd70fb7b640d832bd42513ff

commit b4484b6674388904fd70fb7b640d832bd42513ff
Author:     Jason Frey <jfrey@redhat.com>
AuthorDate: Mon Nov 24 16:55:48 2014 -0500
Commit:     Jason Frey <jfrey@redhat.com>
CommitDate: Fri Dec 5 17:48:19 2014 -0500

    Add purger for policy_events.
    
    PurgerMixin has been created as a set of common methods from all of the
    other purgers.  The other purgers will be modified to reuse these
    common methods in the future.  Initially this mixin has been created
    with methods for purging by date only, but ultimately it should include
    methods for purging "by remaining" as is found in the miq_report_result
    and drift_state purgers.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1167110
    https://bugzilla.redhat.com/show_bug.cgi?id=1171343

 vmdb/app/models/mixins/purging_mixin.rb       | 68 +++++++++++++++++++++++
 vmdb/app/models/policy_event.rb               |  2 +
 vmdb/app/models/policy_event/purging.rb       | 40 ++++++++++++++
 vmdb/config/vmdb.tmpl.yml                     |  4 ++
 vmdb/spec/factories/policy_event.rb           |  4 ++
 vmdb/spec/models/mixins/purging_mixin_spec.rb | 79 +++++++++++++++++++++++++++
 vmdb/spec/models/policy_event/purging_spec.rb | 34 ++++++++++++
 7 files changed, 231 insertions(+)
 create mode 100644 vmdb/app/models/mixins/purging_mixin.rb
 create mode 100644 vmdb/app/models/policy_event/purging.rb
 create mode 100644 vmdb/spec/factories/policy_event.rb
 create mode 100644 vmdb/spec/models/mixins/purging_mixin_spec.rb
 create mode 100644 vmdb/spec/models/policy_event/purging_spec.rb
Comment 6 errata-xmlrpc 2015-01-14 14:44:10 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://rhn.redhat.com/errata/RHSA-2015-0028.html

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