Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1571291 - [RHV] VM snapshot removal cause failure in RHV provider refresh
Summary: [RHV] VM snapshot removal cause failure in RHV provider refresh
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Providers
Version: 5.9.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: GA
: 5.10.0
Assignee: Boriso
QA Contact: Angelina Vasileva
Whiteboard: rhev
Depends On:
Blocks: 1581287
TreeView+ depends on / blocked
Reported: 2018-04-24 13:08 UTC by Ilanit Stein
Modified: 2019-10-22 14:36 UTC (History)
7 users (show)

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

Attachments (Terms of Use)
evm.log (775.50 KB, application/x-gzip)
2018-04-24 13:10 UTC, Ilanit Stein
no flags Details
automation.log (45 bytes, application/x-gzip)
2018-04-24 13:11 UTC, Ilanit Stein
no flags Details
production.log (70.55 KB, application/x-gzip)
2018-04-24 13:11 UTC, Ilanit Stein
no flags Details

System ID Private Priority Status Summary Last Updated
Github ManageIQ manageiq-providers-ovirt pull 241 0 None closed Fix refreshing targeted vm after snapshot removal 2020-05-18 20:09:32 UTC

Description Ilanit Stein 2018-04-24 13:08:26 UTC
Description of problem:
When removing a VM snapshot from RHV side, on CFME, RHV refresh fail
with Last message "Couldn't find Snapshot with 'id'=204" 
(In RHv provider summary page)

Version-Release number of selected component (if applicable):
CFME- (Graph refresh=ON)
Not on CFME- (Graph refresh=OFF)


How reproducible:

Actual results:
RHV refresh fail on snapshot not found.

Expected results:
RHV refresh should not fail on snapshot found, CFME just need to get updated with the snapshot removal.

Additional info:
This is probably related to having the Graph refresh activated, since on CFME- this same flow, do not fail the provider refresh.

Comment 2 Ilanit Stein 2018-04-24 13:10:55 UTC
Created attachment 1426044 [details]

Comment 3 Ilanit Stein 2018-04-24 13:11:18 UTC
Created attachment 1426045 [details]

Comment 4 Ilanit Stein 2018-04-24 13:11:37 UTC
Created attachment 1426046 [details]

Comment 10 CFME Bot 2018-05-22 12:42:00 UTC
New commit detected on ManageIQ/manageiq/master:

commit ff840c93f4731de6ad7a92b26dabc4c2e5918b27
Author:     Ladislav Smola <lsmola@redhat.com>
AuthorDate: Tue May 22 02:51:16 2018 -0400
Commit:     Ladislav Smola <lsmola@redhat.com>
CommitDate: Tue May 22 02:51:16 2018 -0400

    Do not delete children snapshots as part of parent

    Do not delete children snapshots as part of parent. The default
    relation :children, added by acts_as_tree, has :dependent => :destroy.

    So deleting parent, will delete all it's children. This is not behavior
    we want in refresh. In old refresh, we were bypassing this by:

    So first, we deleted the tree relations, then we did create/update/delete
    of the nodes, then we updated the tree connections again. All of that should
    not be needed, if we will just use :dependent => :nullify

    Partially fixes:

 app/models/snapshot.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 11 CFME Bot 2018-05-22 12:51:25 UTC
New commit detected on ManageIQ/manageiq-providers-ovirt/master:

commit 629c024021e34097ffe09cfb7182a0075725362d
Author:     Boris Odnopozov <bodnopoz@redhat.com>
AuthorDate: Thu May 17 04:58:26 2018 -0400
Commit:     Boris Odnopozov <bodnopoz@redhat.com>
CommitDate: Thu May 17 04:58:26 2018 -0400

    Fix refreshing targeted vm after snapshot removal

    Avoid refreshing the vm a second time if snapshot was removed.

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

 app/models/manageiq/providers/redhat/inventory/collector/target_collection.rb | 14 +-
 spec/models/manageiq/providers/redhat/infra_manager/refresh/refresher_graph_target_vm_spec.rb | 14 +-
 spec/vcr_cassettes/manageiq/providers/redhat/infra_manager/refresh/ovirt_sdk_refresh_graph_target_vm_deleted_snapshot.yml | 2452 +
 3 files changed, 2469 insertions(+), 11 deletions(-)

Comment 13 Jan Zmeskal 2018-09-17 12:31:42 UTC
Verified on:

Verification steps:
1. Have a CFME with RHV provider and some VM
2. Go to CFME UI and find your VM's detail page and go to Snapshots.
3. Create a new snapshot.
4. Go to the provider's summary page.
5. Now switch to RHV UI and locate you VM's snapshots and delete the one you just created.
6. Wait until RHV reports that the deletion is complete.
7. Go back to CFME UI and verify there are no error on Provider's summary page or on VM's detail page.
8. Verify there are no errors in evm.log.

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