Opened upstream PR for code changes to remove :dependent => :nullify and replace it with a proper time-based purger: https://github.com/ManageIQ/manageiq/pull/1117
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/19f2c3152314716ae512c3c57848f774192b44a4 commit 19f2c3152314716ae512c3c57848f774192b44a4 Author: Jason Frey <jfrey> AuthorDate: Mon Nov 24 16:51:10 2014 -0500 Commit: Jason Frey <jfrey> CommitDate: Mon Nov 24 16:56:30 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 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(-)
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/a4934ae472b6cf9265b78d5504390fb97bb09dd4 commit a4934ae472b6cf9265b78d5504390fb97bb09dd4 Author: Jason Frey <jfrey> AuthorDate: Mon Nov 24 16:55:48 2014 -0500 Commit: Jason Frey <jfrey> CommitDate: Tue Nov 25 18:36:56 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 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
New commit detected on manageiq/master: https://github.com/ManageIQ/manageiq/commit/c4db81438c91b03ef112f4e8ca63ca7ba769d399 commit c4db81438c91b03ef112f4e8ca63ca7ba769d399 Author: Jason Frey <jfrey> AuthorDate: Mon Nov 24 16:56:05 2014 -0500 Commit: Jason Frey <jfrey> CommitDate: Tue Nov 25 18:36:56 2014 -0500 Added scheduler methods for purging policy_events. https://bugzilla.redhat.com/show_bug.cgi?id=1167110 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(-)
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> AuthorDate: Mon Nov 24 16:51:10 2014 -0500 Commit: Jason Frey <jfrey> 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(-)
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> AuthorDate: Mon Nov 24 16:56:05 2014 -0500 Commit: Jason Frey <jfrey> 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(-)
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> AuthorDate: Mon Nov 24 16:55:48 2014 -0500 Commit: Jason Frey <jfrey> 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
I tried deleting the cluster with few policy events and it got successful deleted in 5.4.0.4.if this verification is good to go, then we can mark this issue as verified. If i have to test with many policy events then can you please provide me with the db used for deleting the cluster? ~Thanks Aziza
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/RHBA-2015-1100.html