Bug 1504010

Summary: Online VMs (Powered On) report lists Orphaned and Archived VMs/Instances
Product: Red Hat CloudForms Management Engine Reporter: Matouš Mojžíš <mmojzis>
Component: ReportingAssignee: Yuri Rudman <yrudman>
Status: CLOSED CURRENTRELEASE QA Contact: Parthvi Vala <pvala>
Severity: high Docs Contact:
Priority: high    
Version: 5.8.0CC: hkataria, istein, jhardy, mpovolny, obarenbo, smallamp, yrudman
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ui:reports
Fixed In Version: 5.10.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1569103 1569104 (view as bug list) Environment:
Last Closed: 2019-02-11 13:54:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1569103, 1569104    

Description Matouš Mojžíš 2017-10-19 09:47:52 UTC
Description of problem:


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

How reproducible:
Always

Steps to Reproduce:
1. Have some Orphaned and/or Archived VMs or instances
2. Queue report Online VMs (Powered On)
3.

Actual results:
Orphaned and Archived VMs are listed as Online VMs.

Expected results:
Only active VMs should be listed as Online VMs.

Additional info:

Comment 2 Ilanit Stein 2017-10-19 15:59:53 UTC
*** Bug 1456245 has been marked as a duplicate of this bug. ***

Comment 3 Yuri Rudman 2017-11-08 17:12:07 UTC
It looks like root of this issue the same as in https://bugzilla.redhat.com/show_bug.cgi?id=1504006 : after deleting provider we are not changing attributes for archived or orphaned VMs.

Comment 4 Yuri Rudman 2017-11-08 20:21:01 UTC
It should be the same logic with visibility of orphaned VM in report and using Filters (in https://bugzilla.redhat.com/show_bug.cgi?id=1504006).

Question to PM: should we filter out archived and orphaned VMs from 'Status / Running' list and from "Online VMs (Powered On)" ?

Comment 5 bascar 2018-03-20 12:18:52 UTC
They should not show. However, the real fix should be to clean up when a provider is removed and not have VM left in states that appear like running.

Comment 7 Yuri Rudman 2018-03-20 20:29:15 UTC
Above PR will filter out archived and orphaned VMs on report Operations -> Virtual Machines -> 'Online VMs (Powered On)' 


There is script for purging archived VMs: .../tools/purge_archived_vms.rb.
Can we have separate BZ if we need to delete VMs automatically when provider deleted.

Comment 8 Yuri Rudman 2018-03-21 13:59:01 UTC
Removing VMs when provider deleted removes concepts of Archived and Orphaned VMs. It is relatively big changes and would be better to track it with separate RFE BZ

Comment 9 bascar 2018-04-10 13:05:28 UTC
I am good with what is proposed in comment #7. I would not open another BZ for removing if someone wants them gone they can use the script.

Comment 10 CFME Bot 2018-04-10 14:41:04 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/670b7f1c3696ff2f120823a9ca34ed4175a4f808
commit 670b7f1c3696ff2f120823a9ca34ed4175a4f808
Author:     Yuri Rudman <yrudman>
AuthorDate: Tue Mar 20 16:05:46 2018 -0400
Commit:     Yuri Rudman <yrudman>
CommitDate: Tue Mar 20 16:05:46 2018 -0400

    do not show archived and orphant VMs on report 'Online VMs (Powered On)'
    https://bugzilla.redhat.com/show_bug.cgi?id=1504010

 product/reports/400_Operations- Virtual Machines/020_Online VMs.yaml | 10 +-
 1 file changed, 7 insertions(+), 3 deletions(-)

Comment 11 CFME Bot 2018-04-10 14:42:11 UTC
New commit detected on ManageIQ/manageiq/master:

https://github.com/ManageIQ/manageiq/commit/670b7f1c3696ff2f120823a9ca34ed4175a4f808
commit 670b7f1c3696ff2f120823a9ca34ed4175a4f808
Author:     Yuri Rudman <yrudman>
AuthorDate: Tue Mar 20 16:05:46 2018 -0400
Commit:     Yuri Rudman <yrudman>
CommitDate: Tue Mar 20 16:05:46 2018 -0400

    do not show archived and orphant VMs on report 'Online VMs (Powered On)'
    https://bugzilla.redhat.com/show_bug.cgi?id=1504010

 product/reports/400_Operations- Virtual Machines/020_Online VMs.yaml | 10 +-
 1 file changed, 7 insertions(+), 3 deletions(-)

Comment 14 Matouš Mojžíš 2018-08-06 16:41:23 UTC
Verified in 5.10.0.8. Orphaned/archived VMs are not displayed in Running VMs report list.