Bug 1476592

Summary: RHV provider VM Quad icon page: VM power 'reset' option do not fail as expected.
Product: Red Hat CloudForms Management Engine Reporter: Ilanit Stein <istein>
Component: ProvidersAssignee: Moti Asayag <masayag>
Status: CLOSED CURRENTRELEASE QA Contact: Angelina Vasileva <anikifor>
Severity: medium Docs Contact:
Priority: low    
Version: 5.8.0CC: gblomqui, jfrey, jhardy, obarenbo, simaishi
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: rhev
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1503639 (view as bug list) Environment:
Last Closed: 2018-03-06 14:52:35 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: Bug
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: RHEVM Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1503639    
Attachments:
Description Flags
VM_reset_flash_message
none
VM_reset_task none

Description Ilanit Stein 2017-07-30 14:58:48 UTC
Description of problem:
For RHV provider, 
CFME: Compute->Infrastructure->VMs, 
check a VM checkbox.
Under Power options, press 'reset', which is an unsupported option.
In response, there __should__ be a flash message with an error, 
however, this is what actually happen:

- There is a flash message, with a green background: 
"Reset initiated for 1 VM and Instance from the CFME Database"
(See attachment "VM_reset_flash_message")

- Under 'Tasks', 'My Other UI Tasks', this task is mentioned as Task finished successfully.
(See attachment "VM_reset_task")


Note that the 'reset' VM command is not passed to RHV side, and that is OK,
since it is not supported.

Version-Release number of selected component (if applicable):
CFME-5.8.1.2/RHV-4.1.3

How reproducible:
100%

Actual results:
reset RHV VM pass.

Expected results:
reset RHV VM should fail.

Additional info:
This bug follow bug 1438690, comment #9.

Comment 2 Ilanit Stein 2017-07-30 15:00:36 UTC
Created attachment 1306610 [details]
VM_reset_flash_message

Comment 3 Ilanit Stein 2017-07-30 15:01:05 UTC
Created attachment 1306611 [details]
VM_reset_task

Comment 5 CFME Bot 2017-08-23 18:53:49 UTC
New commit detected on ManageIQ/manageiq-ui-classic/master:
https://github.com/ManageIQ/manageiq-ui-classic/commit/4dbc186b02469bd85f519df9fc90290db560ea57

commit 4dbc186b02469bd85f519df9fc90290db560ea57
Author:     Moti Asayag <masayag>
AuthorDate: Tue Aug 15 19:16:49 2017 +0300
Commit:     Moti Asayag <masayag>
CommitDate: Wed Aug 23 10:54:03 2017 +0300

    Block unsupported VMs reset
    
    When selecting VMs to be reset via the VMs center dialog, no validation
    is done for the selected VMs. Therefore VMs which doesn't meet the
    criteria and would block such action if applied on a VM specific, can be
    selected and later on failed.
    
    A pre-check is added to make sure VMs which doesn't meet the expected
    terms for reset are prevented from being reset.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1476592

 app/controllers/application_controller/ci_processing.rb |  9 +++++++++
 spec/controllers/vm_infra_controller_spec.rb            | 15 +++++++++++++++
 2 files changed, 24 insertions(+)

Comment 6 CFME Bot 2017-08-24 07:04:11 UTC
New commit detected on ManageIQ/manageiq-providers-ovirt/master:
https://github.com/ManageIQ/manageiq-providers-ovirt/commit/7cef4f0850ec21ae8fa2607453014deb6292c1b4

commit 7cef4f0850ec21ae8fa2607453014deb6292c1b4
Author:     Moti Asayag <masayag>
AuthorDate: Tue Aug 15 19:21:22 2017 +0300
Commit:     Moti Asayag <masayag>
CommitDate: Tue Aug 15 19:21:22 2017 +0300

    Block unsupported VMs reset
    
    RHV doesn't support VM reset action and should block it when VMs are
    being selected for reset via the VMs center dialog.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1476592

 app/models/manageiq/providers/redhat/infra_manager/vm.rb | 1 +
 1 file changed, 1 insertion(+)

Comment 8 Ilanit Stein 2017-11-02 20:35:28 UTC
Verified on CFME-5.9.0.4/RHV-4.1.6.

When running on VMs Quad icon display Power option "reset",
it fails on:
"Reset does not apply to at least one of the selected items"

Comment 9 CFME Bot 2017-11-20 16:23:47 UTC
New commit detected on ManageIQ/manageiq-ui-classic/fine:
https://github.com/ManageIQ/manageiq-ui-classic/commit/67ffc5967335c9fa01c20eee2ef21c3cccf72761

commit 67ffc5967335c9fa01c20eee2ef21c3cccf72761
Author:     Moti Asayag <masayag>
AuthorDate: Sun Nov 5 21:06:00 2017 +0200
Commit:     Moti Asayag <masayag>
CommitDate: Sun Nov 5 21:06:00 2017 +0200

    [FINE] Block unsupported VMs reset
    
    When selecting VMs to be reset via the VMs center dialog, no validation
    is done for the selected VMs. Therefore VMs which doesn't meet the
    criteria and would block such action if applied on a VM specific, can be
    selected and later on failed.
    
    A pre-check is added to make sure VMs which doesn't meet the expected
    terms for reset are prevented from being reset.
    
    This is a backport of https://github.com/ManageIQ/manageiq-ui-classic/pull/1924
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1476592

 app/controllers/application_controller/ci_processing.rb | 10 ++++++++++
 spec/controllers/vm_infra_controller_spec.rb            | 11 +++++++++++
 2 files changed, 21 insertions(+)