Bug 1599661

Summary: [REGRESSION] 'Snapshot VM memory' switch enabled even when VM is down
Product: Red Hat CloudForms Management Engine Reporter: Antonin Pagac <apagac>
Component: UI - OPSAssignee: Martin Maroši <mmarosi>
Status: CLOSED CURRENTRELEASE QA Contact: Antonin Pagac <apagac>
Severity: medium Docs Contact:
Priority: high    
Version: 5.10.0CC: cpelland, hkataria, lavenel, mpovolny, obarenbo, simaishi
Target Milestone: GA   
Target Release: 5.10.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 5.10.0.4 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-11 14:04:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:

Description Antonin Pagac 2018-07-10 10:37:50 UTC
Description of problem:
When creating a snapshot for a VM that is not running, I can choose to include VM memory. This option should be disabled when VM is down.
This option is valid only for VMs that are running or suspended.
Marking as regression, in 5.9.3.4 the original checkbox wasn't even displayed when VM was not running.

Version-Release number of selected component (if applicable):
5.10.0.3

How reproducible:
Always

Steps to Reproduce:
1. Have a VM on infrastructure provider, shut it down
2. Navigate to VM details, click the Snapshots icon
3. Choose to "Create a new snapshot for this VM"
4. Fill a name and move the switch beside the "Snapshot VM memory" to Yes

Actual results:
It is possible to choose VM memory when creating snapshot for powered off VM.

Expected results:
It should not be possible to choose VM memory when creating snapshot for powered off VM.

Additional info:
I have not seen any error in evm.log. The snapshot gets created successfully but without memory.

Comment 4 CFME Bot 2018-07-11 13:02:27 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:

https://github.com/ManageIQ/manageiq-ui-classic/commit/c8ee12013436388ee4c54ddddc0a2630d9bdcff8
commit c8ee12013436388ee4c54ddddc0a2630d9bdcff8
Author:     Martin Maroši <marvusm.mmi>
AuthorDate: Tue Jul 10 10:51:03 2018 -0400
Commit:     Martin Maroši <marvusm.mmi>
CommitDate: Tue Jul 10 10:51:03 2018 -0400

    Fixed visible memory switch while adding snapshot for turned off vm.

    fixes https://bugzilla.redhat.com/show_bug.cgi?id=1599661

 app/views/vm_common/_snap.html.haml | 3 +-
 package.json | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

Comment 5 Antonin Pagac 2018-07-16 14:09:35 UTC
Verified with 5.10.0.4.