Bug 1301123 - objects copied from a previous deleted domain try to refer to the deleted domain when used
Summary: objects copied from a previous deleted domain try to refer to the deleted dom...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.4.0
Hardware: All
OS: All
high
medium
Target Milestone: GA
: 5.6.0
Assignee: William Fitzgerald
QA Contact: Milan Falešník
URL:
Whiteboard:
Depends On:
Blocks: 1303086
TreeView+ depends on / blocked
 
Reported: 2016-01-22 16:28 UTC by Felix Dewaleyne
Modified: 2019-09-12 09:49 UTC (History)
10 users (show)

Fixed In Version: 5.6.0.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1303086 (view as bug list)
Environment:
Last Closed: 2016-06-29 15:32:30 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1348 0 normal SHIPPED_LIVE CFME 5.6.0 bug fixes and enhancement update 2016-06-29 18:50:04 UTC

Description Felix Dewaleyne 2016-01-22 16:28:38 UTC
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 17:05:16 UTC
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 21:16:37 UTC
Update to the suggested query: 
MiqAeClass.where("inherits IS NOT NULL").update_all(:inherits => nil)

Comment 8 CFME Bot 2016-02-29 16:41:26 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/f0c44ebb3012845546353860d4fad23aaf654015

commit f0c44ebb3012845546353860d4fad23aaf654015
Author:     Bill Fitzgerald <wfitzger>
AuthorDate: Tue Feb 23 12:10:03 2016 -0500
Commit:     Bill Fitzgerald <wfitzger>
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 08:32:32 UTC
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 15:32:30 UTC
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.