Bug 1348604 - hosts fail to archive upon provider deletion
Summary: hosts fail to archive upon provider deletion
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: GA
: 5.7.0
Assignee: Adam Grare
QA Contact: Dave Johnson
URL:
Whiteboard: ui:host
Depends On:
Blocks: 1353308
TreeView+ depends on / blocked
 
Reported: 2016-06-21 14:44 UTC by Ramesh A
Modified: 2019-08-06 20:04 UTC (History)
6 users (show)

Fixed In Version: 5.7.0.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1353308 (view as bug list)
Environment:
Last Closed: 2017-01-11 19:59:23 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:
kzvyahin: automate_bug-


Attachments (Terms of Use)
Hosts (95.12 KB, image/png)
2016-06-21 14:44 UTC, Ramesh A
no flags Details

Description Ramesh A 2016-06-21 14:44:34 UTC
Created attachment 1170307 [details]
Hosts

Description of problem:
Host page displays the provider hosts after removing the provider from database

Version-Release number of selected component (if applicable):
5.6.0.11-rc2.2.20160614152915_f315c68 

How reproducible:
Very

Steps to Reproduce:
1. Manage a provider
2. Remove the provider from database via Compute ==> Infrastructure ==> Providers  ==> Select the provider ==> Remove Infrastructure Providers from the VMDB
3. Wait for sometime.  Now navigate to Compute ==> Infrastructure ==> Hosts, and check for hosts

Actual results:
1. Displays all the hosts from the providers which have been deleted.
2. Also clicking on Hosts allows access it
Refer the screenshot for further information

Expected results:
Should not display the hosts in this page

Additional info:

Comment 2 Greg Blomquist 2016-06-22 19:43:36 UTC
Hosts shouldn't be deleted from MIQ when the Provider is deleted.  However, they should eventually become archived.

Ramesh, can you check if the hosts are archived?

Comment 3 Adam Grare 2016-06-27 14:53:27 UTC
When you remove a provider from vmdb it doesn't disconnect the hosts, it just clears the ems_id.  Vms have a method to say they are archived if their ems_id is nil but there isn't anything like that for hosts.  The result is that VMs show up as archived but hosts still have their original power state.  Datastores also still show up for deleted providers.

Confirmed this is the same behavior as 5.4.

Comment 4 Dave Johnson 2016-07-06 13:41:12 UTC
Adam cleared the needinfo...

Comment 7 CFME Bot 2016-07-18 22:45:44 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/6bed278ae60cc15e9d35fd1628b12b664ef981df

commit 6bed278ae60cc15e9d35fd1628b12b664ef981df
Author:     Adam Grare <agrare>
AuthorDate: Wed Jul 6 12:15:42 2016 -0400
Commit:     Adam Grare <agrare>
CommitDate: Tue Jul 12 07:55:01 2016 -0400

    Show hosts as archived when their ems is deleted
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1348604

 app/helpers/quadicon_helper.rb |  2 +-
 app/models/host.rb             | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)


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