Bug 1406431 - RuntimeError Multiple parents found / in generate_one_content_for_group
Summary: RuntimeError Multiple parents found / in generate_one_content_for_group
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Appliance
Version: 5.6.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: GA
: 5.8.0
Assignee: Gregg Tanzillo
QA Contact: Sudhir Mallamprabhakara
URL:
Whiteboard:
Depends On:
Blocks: 1428124 1428125
TreeView+ depends on / blocked
 
Reported: 2016-12-20 13:51 UTC by Gellert Kis
Modified: 2021-09-09 12:03 UTC (History)
11 users (show)

Fixed In Version: 5.8.0.4
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1428124 1428125 (view as bug list)
Environment:
5.5.0.13
Last Closed: 2020-10-28 19:09:50 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 4 CFME Bot 2017-03-01 18:41:31 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/af9e051cb6d0d5b90b0e5448cc8ca15e5557011d

commit af9e051cb6d0d5b90b0e5448cc8ca15e5557011d
Author:     Jason Frey <jfrey>
AuthorDate: Fri Feb 24 01:50:55 2017 -0500
Commit:     Jason Frey <jfrey>
CommitDate: Fri Feb 24 17:07:22 2017 -0500

    Fix "Multiple Parents Found" issue when moving a relationship.
    
    Originally, `.parent=` was written in terms of `add_children`.  However,
    `add_children` supports duplicating nodes in the tree.  This is reasonable
    because you may have a tree where multiple entries make sense, and for
    those things that have multiple entries, you wouldn't call `.parent`, you
    would probably call `.parents` and it is expected that calling `.parent`
    would blow up with the "Multiple Parents Found" error.  However, the
    expectation of calling `.parent=` is that it will become the new, sole,
    parent, and so implementing it via add_children is wrong because it
    creates an oddity in that you can call `.parent=` and then not be able to
    call `.parent` afterwards.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1379464
    https://bugzilla.redhat.com/show_bug.cgi?id=1391850
    https://bugzilla.redhat.com/show_bug.cgi?id=1406431

 app/models/account.rb                         |  4 +-
 app/models/mixins/relationship_mixin.rb       | 21 +++++-----
 lib/extensions/ar_miq_set.rb                  |  3 +-
 spec/models/mixins/relationship_mixin_spec.rb | 56 +++++++++++++++++++++++++++
 4 files changed, 71 insertions(+), 13 deletions(-)

Comment 7 Matouš Mojžíš 2017-05-26 13:26:39 UTC
Gellert,
do you know how to reproduce it?
I can't reproduce it on my appliance.
Thanks

Comment 10 Matouš Mojžíš 2017-09-29 11:32:13 UTC
I still don't have enough information to reproduce it.

Comment 11 Edu Alcaniz 2017-10-03 13:35:22 UTC
I am checking with the customer, the steps to reproduce again and we could verify that it is solved.


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