Bug 1421951 - VMware : Failure in snapshot revert
Summary: VMware : Failure in snapshot revert
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.7.0
Hardware: x86_64
OS: Linux
high
high
Target Milestone: GA
: 5.8.0
Assignee: Brian McLaughlin
QA Contact: Aziza Karol
URL:
Whiteboard:
: 1419885 (view as bug list)
Depends On:
Blocks: 1423031
TreeView+ depends on / blocked
 
Reported: 2017-02-14 07:54 UTC by Prasad Mukhedkar
Modified: 2020-03-11 15:47 UTC (History)
8 users (show)

Fixed In Version: 5.8.0.2
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1423031 (view as bug list)
Environment:
Last Closed: 2017-06-12 16:13:02 UTC
Category: Bug
Cloudforms Team: CFME Core
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Comment 2 Adam Grare 2017-02-14 15:57:27 UTC
I suspect the issue is that the snapshot_id being passed in is nil:

:task=>"revert_to_snapshot", :userid=>"admin", :snap_selected=>nil

Comment 3 Adam Grare 2017-02-14 16:00:04 UTC
Confirmed, I added a log statement to print the snapshot_id passed to raw_revert_to_snapshot and this is the result:

[----] I, [2017-02-14T10:56:59.727033 #14187:cf713c]  INFO -- : MIQ(ManageIQ::Providers::Vmware::InfraManager::Vm#raw_revert_to_snapshot) ManageIQ::Providers::Vmware::InfraManager::Vm#raw_revert_to_snapshot: snapshot_id: nil
[----] E, [2017-02-14T10:56:59.729890 #14187:cf713c] ERROR -- : MIQ(MiqQueue#deliver) Message id: [1000000577076], Error: [Requested VM snapshot not found, unable to RevertTo snapshot]

I'll track down where the nil snapshot id is coming from.

Comment 4 Adam Grare 2017-02-14 17:28:08 UTC
When reverting to a snapshot the UI uses the session[:snap_selected] property which is set in snap_pressed in ./app/controllers/vm_common.rb

When there is only one snapshot the snap_pressed method isn't invoked so by the time the revert_snapshot task is created session[:snap_selected] is nil.

Assigning to UI team.

Comment 5 Harpreet Kataria 2017-02-14 19:26:27 UTC
Brian,

Can you look into it, since you are able to replicate on 5.7.0.17. Let me know if you have questions or need help with the fix.

Thanks,
~Harpreet

Comment 7 CFME Bot 2017-02-16 19:48:01 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/118eae8b360d980c6787c3b1fa3d28f81f762273

commit 118eae8b360d980c6787c3b1fa3d28f81f762273
Author:     Brian McLaughlin <bmclaugh>
AuthorDate: Thu Feb 16 11:03:26 2017 -0500
Commit:     Brian McLaughlin <bmclaugh>
CommitDate: Thu Feb 16 13:05:59 2017 -0500

    Fix Snapshot revert
    
    Ensure that session[:snap_selected] is set as expected
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1421951

 app/controllers/vm_common.rb       |  1 +
 spec/controllers/vm_common_spec.rb | 50 ++++++++++++++++++++++++--------------
 2 files changed, 33 insertions(+), 18 deletions(-)

Comment 10 CFME Bot 2017-02-20 16:41:03 UTC
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/b354066d6939387473a60ce3e929cdb0fda73bc3

commit b354066d6939387473a60ce3e929cdb0fda73bc3
Author:     Brian McLaughlin <bmclaugh>
AuthorDate: Thu Feb 16 11:03:26 2017 -0500
Commit:     Brian McLaughlin <bmclaugh>
CommitDate: Mon Feb 20 10:00:51 2017 -0500

    Fix Snapshot revert
    
    Ensure that session[:snap_selected] is set as expected
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1421951

 app/controllers/vm_common.rb       |  1 +
 spec/controllers/vm_common_spec.rb | 28 ++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+)

Comment 11 Adam Grare 2017-03-01 18:48:26 UTC
*** Bug 1419885 has been marked as a duplicate of this bug. ***

Comment 12 Aziza Karol 2017-03-31 05:42:31 UTC
snapshot revert successful.

Verified:5.8.0.8-alpha1.20170328221054_e6ca7a2


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