Bug 1592430 - RHV provider target refresh fail on "undefined method `cluster'", right after VM removal
Summary: RHV provider target refresh fail on "undefined method `cluster'", right after...
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
high
high
Target Milestone: GA
: 5.10.0
Assignee: Martin Perina
QA Contact: Angelina Vasileva
URL:
Whiteboard: rhev
Depends On:
Blocks: 1594839
TreeView+ depends on / blocked
 
Reported: 2018-06-18 14:02 UTC by Ilanit Stein
Modified: 2019-09-18 15:18 UTC (History)
9 users (show)

Fixed In Version: 5.10.0.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1594839 (view as bug list)
Environment:
Last Closed: 2019-02-11 14:06:17 UTC
Category: Bug
Cloudforms Team: RHEVM
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
evm.log (982.22 KB, application/x-gzip)
2018-06-18 14:05 UTC, Ilanit Stein
no flags Details
rhevm.log (71.06 KB, application/x-gzip)
2018-06-18 14:28 UTC, Ilanit Stein
no flags Details

Description Ilanit Stein 2018-06-18 14:02:59 UTC
Description of problem:
CFME connected to a RHV provider.
VM removal on RHV side is followed by a refresh failure:

In RHV provider details page, "last Refresh" field show:
"Error - 4 Minutes Ago
undefined method `cluster' for nil:NilClass"

Version-Release number of selected component (if applicable):
CFME-5.9.3.1
RHV-4.2.3

Expected results:
RHV VM removal should not cause RHV refresh failure.

Additional info:
* Running "Refresh Relationships and power states" for the RHV provider, after the refresh failure ends up with a successful refresh.
* This is not happening on CFME-5.9.3.0,
therefore might be that bug is related to Graph refresh, that was switched to ON in CFME-5.9.3.1

Comment 2 Ilanit Stein 2018-06-18 14:05:14 UTC
Created attachment 1452654 [details]
evm.log

Comment 3 Ilanit Stein 2018-06-18 14:28:35 UTC
Created attachment 1452657 [details]
rhevm.log

Comment 4 Ilanit Stein 2018-06-19 15:23:56 UTC
This bug is indeed related to having RHV Graph refresh ON.

When moving RHV Graph refresh to OFF,
VM removal on RHV side, is not followed by error target refresh error.

Comment 7 CFME Bot 2018-06-24 11:53:42 UTC
New commit detected on ManageIQ/manageiq-providers-ovirt/master:

https://github.com/ManageIQ/manageiq-providers-ovirt/commit/31d481adb954c50c2efa1219873af9b5be6da4ac
commit 31d481adb954c50c2efa1219873af9b5be6da4ac
Author:     Boris Odnopozov <bodnopoz>
AuthorDate: Thu Jun 21 05:41:36 2018 -0400
Commit:     Boris Odnopozov <bodnopoz>
CommitDate: Thu Jun 21 05:41:36 2018 -0400

    Fix vm targeted refresh on removal

    Targeted graph refresh on deleted vm would fail.

    Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1592430

 app/models/manageiq/providers/redhat/inventory/collector/target_collection.rb | 2 +-
 app/models/manageiq/providers/redhat/inventory/parser/infra_manager.rb | 2 +-
 spec/models/manageiq/providers/redhat/infra_manager/refresh/refresher_graph_target_vm_spec.rb | 15 +
 spec/vcr_cassettes/manageiq/providers/redhat/infra_manager/refresh/ovirt_sdk_refresh_graph_target_vm_removal.yml | 4557 +
 4 files changed, 4574 insertions(+), 2 deletions(-)

Comment 8 Moran Goldboim 2018-06-25 07:33:24 UTC
retargeting to 5.9.3, since graph refresh is on by default in this version.

Comment 9 Ilanit Stein 2018-06-25 11:24:49 UTC
Verified on CFME-5.9.3.2 + Fix for bug 1593202 + Fix attached to this bug / 
RHV-4.2.3.5.

Comment 11 Ilanit Stein 2018-09-17 11:01:40 UTC
Verified on CFME-5.10.0.15 (Graph refresh is ON, by default)/RHV-4.2.3.

Removal of a VM from RHV provider (done on RHV side), is followed by a successful target refresh.


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