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:
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?
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.
Adam cleared the needinfo...
https://github.com/ManageIQ/manageiq/pull/9633
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(-)