Bug 1571254 - [RHV] Orphaned VM has power state ON
Summary: [RHV] Orphaned VM has power state ON
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: GA
: cfme-future
Assignee: Martin Perina
QA Contact: Angelina Vasileva
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-24 12:09 UTC by Jan Zmeskal
Modified: 2019-08-19 11:10 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-11 15:26:54 UTC
Category: ---
Cloudforms Team: RHEVM
Target Upstream Version:
istein: automate_bug+


Attachments (Terms of Use)

Description Jan Zmeskal 2018-04-24 12:09:20 UTC
Description of problem:
If a VM had power state ON while its provider was removed, the power state will stay ON for such VM even after the VM becomes Orphaned.

Version-Release number of selected component (if applicable):
CFME 5.9.2.3
RHV 4.2.2.5

How reproducible:
100 %

Steps to Reproduce:
1. Add a RHV provider to CFME.
2. Provision a VM from template (vm_orphaned in my case).
3. Wait for the provisioning to end. Make sure that the VM is ON and that CFME registers its power state as ON.
4. Remove your infrastructure provider from inventory. 
5. Find you VM in CFME UI and make sure it's state is orphaned.
6. Go to its summary page and check its power state. 
7. Also check its power state in vmdb_production DB (SELECT * FROM vms WHERE name = '<your_vm_name>'.

Actual results:
Both in UI and in DB the power state of such orphaned VM is ON.

Expected results:
I believe such a statement makes no sense. The only source of information about VM for CFME is the provider. If the VM is Orphaned (i.e. lost its provider), there is no way how CFME could know that the power state is on. In reality, from the point of view of CFME, the power state for an Orphaned VM should be unknown. 

If we want to display _last known_ power state, it should be in some different field. However I cannot see much use for such information.

Comment 4 Jan Zmeskal 2018-10-01 13:04:45 UTC
This problem also occurs on CFME 5.10.0.17, therefore a clone should be created.


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