Bug 1566831 - Some projects/tenants are not reflecting at CFME Region database
Summary: Some projects/tenants are not reflecting at CFME Region database
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: GA
: 5.8.5
Assignee: Scott Seago
QA Contact: Ido Ovadia
Depends On:
Blocks: 1572700
TreeView+ depends on / blocked
Reported: 2018-04-13 05:34 UTC by Imaan
Modified: 2018-08-23 13:59 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-08-23 11:44:09 UTC
Category: ---
Cloudforms Team: Openstack
Target Upstream Version:

Attachments (Terms of Use)

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

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