Bug 1660097

Summary: Datacenter parent assigned to wrong cluster
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: ProvidersAssignee: Adam Grare <agrare>
Status: CLOSED ERRATA QA Contact: Nandini Chandra <nachandr>
Severity: high Docs Contact: Red Hat CloudForms Documentation <cloudforms-docs>
Priority: high    
Version: 5.9.4CC: agrare, cpelland, dmetzger, jfrey, jhardy, nachandr, obarenbo
Target Milestone: GAKeywords: ZStream
Target Release: 5.9.7   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.9.7.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1659214 Environment:
Last Closed: 2019-01-23 14:35:55 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: RHEVM Target Upstream Version:
Embargoed:
Bug Depends On: 1659214    
Bug Blocks:    

Comment 3 CFME Bot 2018-12-17 14:42:18 UTC
New commit detected on ManageIQ/manageiq-providers-ovirt/gaprindashvili:

https://github.com/ManageIQ/manageiq-providers-ovirt/commit/d1d161f69320b908902289bd8a0ec6bdc9d9e6c8
commit d1d161f69320b908902289bd8a0ec6bdc9d9e6c8
Author:     Adam Grare <agrare>
AuthorDate: Mon Dec 17 09:03:36 2018 -0500
Commit:     Adam Grare <agrare>
CommitDate: Mon Dec 17 09:03:36 2018 -0500

    Scope EmsFolder and ResourcePool queries by ems_id

    When searching for EmsFolders and ResourcePools by uid_ems scope by the
    ems_id to prevent resources from being assigned to a folder in the wrong
    EMS.

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

 app/models/manageiq/providers/redhat/inventory_collection_default/infra_manager.rb | 10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

Comment 4 Nandini Chandra 2018-12-21 21:11:49 UTC
Verified in 5.9.7.0

Comment 5 Nandini Chandra 2018-12-21 21:20:40 UTC
Reproducer steps:

1)Add a provider from the UI, let it do a refresh (In this case,provider had just one cluster)
2)stop evmserverd - > service evmserverd stop
3)Delete the provider through rails c
  irb(main):003:0> ExtManagementSystem.delete(1)
  => 1
4)Verify that the cluster exists even after its provider has been deleted through rail c
 irb(main):007:0> EmsCluster.count
  PostgreSQLAdapter#log_after_checkout, connection_pool: size: 5, connections: 1, in use: 1, waiting_in_queue: 0
  => 1
4)start evmserver -> service evmserverd stop
5)Re-add the same provider
6)Navigate to the cluster summary screen through Compute->Infrastructure->Clusters.

Before fix:
"Multiple Relationship Found" error in the logs while navigating to the cluster summary screen through Compute->Infrastructure->Clusters.

After fix:
No errors in the logs and it should be possible to navigate to the cluster summary screen through Compute->Infrastructure->Clusters.

Comment 6 Nandini Chandra 2018-12-21 22:00:44 UTC
Step 5 should read:

5)Re-add the same provider through UI

Comment 8 errata-xmlrpc 2019-01-23 14:35:55 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-2019:0110