Bug 1547740 - [RFE] Deleting a cloud provider does not clean up associated cloud tenant and group.
Summary: [RFE] Deleting a cloud provider does not clean up associated cloud tenant and...
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.10.0
Assignee: Sam Lucidi
QA Contact: Dave Johnson
: 1547734 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2018-02-21 20:25 UTC by Lars Kellogg-Stedman
Modified: 2019-02-07 23:01 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-02-07 23:01:17 UTC
Category: ---
Cloudforms Team: Openstack
Target Upstream Version:

Attachments (Terms of Use)

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:0212 None None None 2019-02-07 23:01:24 UTC

Description Lars Kellogg-Stedman 2018-02-21 20:25:53 UTC
Description of problem:

At a partner site, we created a new cloud provider.  We subsequently deleted that cloud provider, and then added a new one with the same name.  It turns out that the delete operation did not remove the associated cloud tenant or group (i.e., the entries in the "tenants" and "miq_groups" tables in the database).

This ultimately resulted in synchronization problems as reported in https://bugzilla.redhat.com/show_bug.cgi?id=1547734.

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


How reproducible:

Steps to Reproduce:
1. create a cloud provider
2. delete that cloud provider
3. look at the "access control" section of the "configuration" screen and see that the "cloud tenant" is still visible

Actual results:

Stale cloud tenants resulted in synchronization errors.

Expected results:

Related tenant and group would get deleted.

Comment 2 Dave Johnson 2018-02-21 20:45:12 UTC
Please assess the impact of this issue and update the severity accordingly.  Please refer to https://bugzilla.redhat.com/page.cgi?id=fields.html#bug_severity for a reminder on each severity's definition.

If it's something like a tracker bug where it doesn't matter, please set the severity to Low.

Comment 4 Bronagh Sorota 2018-02-26 20:47:30 UTC
Hi Lars,
There doesn't seem to be any mention of the Provider type, but it sounds like this is for Openstack, is that correct?


Comment 5 Lars Kellogg-Stedman 2018-02-27 04:15:58 UTC
That's correct, this was an OpenStack provider.

Comment 6 Marek Aufart 2018-02-28 09:43:53 UTC
Hi, just for clarificaton, was the Tenant Mapping feature enabled for the Cloud Provider? Thanks.

Comment 7 Lars Kellogg-Stedman 2018-02-28 16:21:34 UTC
Yes, tenant mapping was enabled for the cloud provider.

Comment 10 Sam Lucidi 2018-08-23 17:44:27 UTC

Comment 11 CFME Bot 2018-10-17 20:41:00 UTC
New commit detected on ManageIQ/manageiq/hammer:

commit 051d05f4ea7f061721720b8202bd3b7a96ec6dce
Author:     Adam Grare <agrare@redhat.com>
AuthorDate: Wed Oct 17 14:26:15 2018 -0400
Commit:     Adam Grare <agrare@redhat.com>
CommitDate: Wed Oct 17 14:26:15 2018 -0400

    Merge pull request #17866 from mansam/cleanup-mapped-tenants-after-ems-destroy

    Clean up mapped tenants after a CloudManager is destroyed

    (cherry picked from commit 89a1ebf0dadecf532b557f74adbb68dce82c1dae)

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

 app/models/manageiq/providers/cloud_manager.rb | 10 +
 spec/models/manageiq/providers/cloud_manager_spec.rb | 11 +
 2 files changed, 21 insertions(+)

Comment 12 Sam Lucidi 2018-10-26 13:15:11 UTC
*** Bug 1547734 has been marked as a duplicate of this bug. ***

Comment 13 Jad Haj Yahya 2018-12-05 15:02:20 UTC
Verified on

Comment 14 errata-xmlrpc 2019-02-07 23:01:17 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.


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