Bug 1497522 - Deleted VM is moved to status Orphan, though it should move to Archived.
Summary: Deleted VM is moved to status Orphan, though it should move to Archived.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: GA
: 5.7.4
Assignee: Piotr Kliczewski
QA Contact: Angelina Vasileva
URL:
Whiteboard: rhev:provisioning
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-01 12:00 UTC by Ilanit Stein
Modified: 2022-07-09 08:58 UTC (History)
9 users (show)

Fixed In Version: 5.7.4.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-18 20:30:12 UTC
Category: Bug
Cloudforms Team: RHEVM
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
evm.log (636.45 KB, application/x-gzip)
2017-10-01 12:18 UTC, Ilanit Stein
no flags Details
automation.log (47.84 KB, application/x-gzip)
2017-10-01 12:20 UTC, Ilanit Stein
no flags Details
rhevm.log (33.40 KB, application/x-gzip)
2017-10-01 12:20 UTC, Ilanit Stein
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github ManageIQ manageiq pull 16218 0 None None None 2017-10-17 15:28:10 UTC
Red Hat Product Errata RHSA-2017:3484 0 normal SHIPPED_LIVE Important: Red Hat CloudForms security, bug fix, and enhancement update 2017-12-19 01:24:16 UTC

Description Ilanit Stein 2017-10-01 12:00:52 UTC
Description of problem:
When deleting a VM in RHV, it turn into Orphan, and not Archived, as expected. 

Version-Release number of selected component (if applicable):
CFME-5.7.4/RHV-4.1.7

How reproducible:
Easily, manually as well.

Steps to Reproduce:
1.Provision from CFME side a VM from template.
2.Retire this VM from CFME side.
3.Refresh the VMs view show the VM status was updated to Orphan. 

Additional info:
* This is a new test, so there is no statistics, that can indicate if this is a regression or not.

* On CFME-5.8.2.1, the VM status does move into Archived status, as expected.
This problem seem to be CFME-5.7 specific.

Comment 2 Ilanit Stein 2017-10-01 12:18:37 UTC
Created attachment 1332901 [details]
evm.log

Comment 3 Ilanit Stein 2017-10-01 12:20:03 UTC
Created attachment 1332902 [details]
automation.log

Comment 4 Ilanit Stein 2017-10-01 12:20:25 UTC
Created attachment 1332903 [details]
rhevm.log

Comment 5 Piotr Kliczewski 2017-10-06 15:00:55 UTC
It looks like this is the issue:

[----] E, [2017-10-01T06:24:28.799516 #1198:87d138] ERROR -- : MIQ(ManageIQ::Providers::Redhat::InfraManager::Refresher#refresh) EMS: [rhv_cfme_integration], id: [10] Refresh failed
[----] E, [2017-10-01T06:24:28.801149 #1198:87d138] ERROR -- : [NoMethodError]: undefined method `detect' for nil:NilClass  Method:[rescue in block in refresh]
[----] E, [2017-10-01T06:24:28.801427 #1198:87d138] ERROR -- : /var/www/miq/vmdb/app/models/manageiq/providers/redhat/infra_manager/refresh_parser.rb:236:in `block in host_inv_to_switch_hashes'
/var/www/miq/vmdb/app/models/manageiq/providers/redhat/infra_manager/refresh_parser.rb:233:in `each'
/var/www/miq/vmdb/app/models/manageiq/providers/redhat/infra_manager/refresh_parser.rb:233:in `host_inv_to_switch_hashes'
/var/www/miq/vmdb/app/models/manageiq/providers/redhat/infra_manager/refresh_parser.rb:110:in `block in host_inv_to_hashes'
/var/www/miq/vmdb/app/models/manageiq/providers/redhat/infra_manager/refresh_parser.rb:85:in `each'
/var/www/miq/vmdb/app/models/manageiq/providers/redhat/infra_manager/refresh_parser.rb:85:in `host_inv_to_hashes'

Comment 6 Piotr Kliczewski 2017-10-09 14:47:28 UTC
I tested the latest 57 upstream based on e303bdb8345b8c47f87651f359bcee4a6ab5468f and I was not able to reproduce the issue. I performed following steps:
1. imported cirros template
2. used imported template to create a vm only by providing email and vm name (required info)
3. waited for vm to be provisioned and started
4. stopped the vm
5. retired the vm

The vm was properly marked as archived.

Are there any specific steps that I need to perform to reproduce the issue?

Comment 7 Ilanit Stein 2017-10-15 09:13:04 UTC
The steps you mention seem to be similar to mine.
Not sure why this is occurring on my env.
I suggest to connect your latest 57 upstream to my RHV env, and try to reproduce.
I shall send you my RHV details by email.

Comment 8 Ilanit Stein 2017-10-16 11:21:21 UTC
It was reproduced manually on CFME-5.7.4/RHV-4.1.3, by the steps in the description, using a RHEL7.3 template to create the VM.

Comment 9 Oved Ourfali 2017-10-30 08:38:38 UTC
Piotr - should it move to POST?

Comment 10 Piotr Kliczewski 2017-10-30 08:40:48 UTC
Correct

Comment 11 Ilanit Stein 2017-11-16 11:43:58 UTC
Verified on CFME-5.7.4.1.20171114202358_de8178a/RHV-4.1.6

Comment 14 errata-xmlrpc 2017-12-18 20:30:12 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.

https://access.redhat.com/errata/RHSA-2017:3484


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