Bug 1566831

Summary: Some projects/tenants are not reflecting at CFME Region database
Product: Red Hat CloudForms Management Engine Reporter: Imaan <ikaur>
Component: ProvidersAssignee: Scott Seago <sseago>
Status: CLOSED INSUFFICIENT_DATA QA Contact: Ido Ovadia <iovadia>
Severity: medium Docs Contact:
Priority: high    
Version: 5.8.0CC: cpelland, dmetzger, gblomqui, ikaur, jfrey, jhardy, jprause, obarenbo, sseago
Target Milestone: GA   
Target Release: 5.8.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-08-23 11:44:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: Openstack Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1572700    

Description Imaan 2018-04-13 05:34:12 UTC
Description of problem:

Some projects/tenants are not reflecting at CFME Region database. 

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

Red Hat CloudForms 4.5

Actual results: 

New tenants are visible at Cloud tenant list(Compute -> Cloud -> Tenant) but not listed in Access Control Tenants database.

Expected results:

It should map the tenants correctly.

Comment 3 Scott Seago 2018-04-23 13:22:39 UTC
If you see tenants in the Cloud Tenant list that are not showing up in the Tenant list, this seems to indicate that the link from CloudTenant to the source tenant is not being created (or updated). The post_refresh_ems method on CloudTenant re-syncs with Tenants (updating name, etc. as needed, and creating Tenants if they don't already exist). Is refresh happening successfully? It could be that refresh isn't happening, or if it is happening, that somehow the tenant refresh is erroring out.

I was unable to duplicate these conditions in my test environment. When I created a new Cloud Tenant, the next refresh created the missing Tenant. When I updated the CloudTenant name via the OpenStack CLI, the next refresh updated the name for both Cloud Tenant and Tenant. When I manually deleted the Tenant object via rails console, the next refresh re-generated the missing Tenant. Cloud Tenants are synced by ExtManagementSystem, so I'm wondering if somehow the ems_id is messed up for some of these. Could you run the following in the reproducing system so I can see the relationship between the Tenant and CloudTenant objects:

pp Tenant.pluck(:name,:id, :source_type, :source_id) ; nil
pp CloudTenant.pluck(:name,:id, :ems_id) ; nil