Bug 1438349 - [RHV] Timing issue between refreshes when a vm is removed
Summary: [RHV] Timing issue between refreshes when a vm is removed
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.8.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.9.0
Assignee: Piotr Kliczewski
QA Contact: Angelina Vasileva
URL:
Whiteboard: rhev
Depends On:
Blocks: 1438518
TreeView+ depends on / blocked
 
Reported: 2017-04-03 07:21 UTC by Piotr Kliczewski
Modified: 2019-08-19 08:36 UTC (History)
7 users (show)

Fixed In Version: 5.9.0.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1438518 (view as bug list)
Environment:
Last Closed: 2018-03-06 15:10:11 UTC
Category: ---
Cloudforms Team: RHEVM
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
evm.log when trying to verify (157.55 KB, text/plain)
2017-11-15 12:34 UTC, Jan Zmeskal
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github ManageIQ manageiq pull 14572 0 None None None 2017-04-03 07:26:15 UTC

Description Piotr Kliczewski 2017-04-03 07:21:28 UTC
When we have an event order like vm stop and later vm delete it could happen that vm would be already removed from inventory during the first event refresh which would cause second refresh to fail during disconnect_storage step.

Expected behavior:
disconnect_storage is able to handle situation when a vm was already removed.

Comment 4 Jan Zmeskal 2017-11-09 16:27:31 UTC
How would the bug look like from user's perspective? Do I understand correctly that the reproduction steps are these?
1. Stop VM
2. Delete VM

Comment 5 Piotr Kliczewski 2017-11-10 11:44:58 UTC
(In reply to Jan Zmeskal from comment #4)
> How would the bug look like from user's perspective? Do I understand
> correctly that the reproduction steps are these?
> 1. Stop VM
> 2. Delete VM

Correct, the issue is that second needs to be done just after first.

Comment 6 Jan Zmeskal 2017-11-15 12:34:01 UTC
I tried to verify in this manner:

1. I had RHV provider in CFME
2. I added one running VM (from within RHV) and refreshed relationships in CFME
3. VM is visible in CFME inventory
4. I powered off VM from CFME
5. Right after that I clicked "Remove selected items from inventory" for the given VM
6. Observing logs (see attachment) -> no error found
7. Refreshed relationships in CFME
8. VM is still visible in CFME inventory under RHV provider
9. I tried removing VM again
10. Refreshed relationships for the provider
11. VM is still visible

I believe this is not what is supposed to be happening, is that right? As far as I understand it, the VM should have been removed from inventory in this scenario. Please correct me if I am wrong.

Comment 7 Jan Zmeskal 2017-11-15 12:34:49 UTC
Created attachment 1352576 [details]
evm.log when trying to verify

Comment 8 Piotr Kliczewski 2017-11-20 10:12:56 UTC
The steps are not correct. Your step 5 is not correct. You want to retire a vm not remove it from inventory. Retire means that it will be removed from ovirt and remove from inventory means that on next refresh it will be recreated.

Comment 9 Jan Zmeskal 2017-11-20 15:13:19 UTC
(In reply to Piotr Kliczewski from comment #8)
> The steps are not correct. Your step 5 is not correct. You want to retire a
> vm not remove it from inventory. Retire means that it will be removed from
> ovirt and remove from inventory means that on next refresh it will be
> recreated.

I repaired my steps and after powering off the VM, I retired it. Everything worked as expected and no error found in evm.log.


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