Bug 1301123 - objects copied from a previous deleted domain try to refer to the deleted domain when used
objects copied from a previous deleted domain try to refer to the deleted dom...
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate (Show other bugs)
5.4.0
All All
high Severity medium
: GA
: 5.6.0
Assigned To: William Fitzgerald
Milan Falešník
: ZStream
Depends On:
Blocks: 1303086
  Show dependency treegraph
 
Reported: 2016-01-22 11:28 EST by Felix Dewaleyne
Modified: 2016-06-29 11:32 EDT (History)
10 users (show)

See Also:
Fixed In Version: 5.6.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1303086 (view as bug list)
Environment:
Last Closed: 2016-06-29 11:32:30 EDT
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)

  None (edit)
Description Felix Dewaleyne 2016-01-22 11:28:38 EST
Description of problem:
Methods and instances copied from a domain into a new one still attempt to call the previous domain after it has been deleted

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

How reproducible:
customer environment only

Steps to Reproduce:
1. upgrade domain from a cloudforms 3.1 appliance
2. copy methods from "customer" into a new domain
3. delete the customer domain
4. call the method

Actual results:
the call still tries to use the customer domain which has been deleted

Expected results:
the call just uses the new domain

Additional info:
more data will be attached. Could be limited to a very specific setup ; deleting and re-creating the elements fixed the issue.
Comment 3 mkanoor 2016-01-27 12:05:16 EST
We had provided a small snippet of code to the customer to be run from the the rails console to clear out the old inherits value. It is logged in this ticket

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

--------------
We would have to clear out the inherits column from the miq_ae_class from the rails console using 
MiqAeClass.where("inherits IS NOT NULL").each { |c| c.update_attributes(:inherits => nil) }

-------------
Comment 5 Greg McCullough 2016-02-10 16:16:37 EST
Update to the suggested query: 
MiqAeClass.where("inherits IS NOT NULL").update_all(:inherits => nil)
Comment 8 CFME Bot 2016-02-29 11:41:26 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/f0c44ebb3012845546353860d4fad23aaf654015

commit f0c44ebb3012845546353860d4fad23aaf654015
Author:     Bill Fitzgerald <wfitzger@redhat.com>
AuthorDate: Tue Feb 23 12:10:03 2016 -0500
Commit:     Bill Fitzgerald <wfitzger@redhat.com>
CommitDate: Thu Feb 25 17:05:15 2016 -0500

    Automate - fix inherits problem.
    
    Modified test.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1301123
    
    Removed inheritance test from miq_ae_engine_spec.

 lib/miq_automation_engine/engine/miq_ae_object.rb  |  2 +-
 .../miq_automation_engine/miq_ae_engine_spec.rb    | 28 ----------------------
 .../miq_automation_engine/miq_ae_object_spec.rb    | 11 +++++++++
 3 files changed, 12 insertions(+), 29 deletions(-)
Comment 9 Milan Falešník 2016-05-12 04:32:32 EDT
Verified in 5.6.0.6-beta2.5 using steps from https://bugzilla.redhat.com/show_bug.cgi?id=1303086#c8
Comment 11 errata-xmlrpc 2016-06-29 11:32:30 EDT
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/RHBA-2016:1348

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