Bug 1278463

Summary: UI should not allow scans to be issued if the datastore is not vmware based
Product: Red Hat CloudForms Management Engine Reporter: Josh Carter <jocarter>
Component: UI - OPSAssignee: Harpreet Kataria <hkataria>
Status: CLOSED ERRATA QA Contact: Ramesh A <rananda>
Severity: high Docs Contact:
Priority: high    
Version: 5.4.0CC: cbolz, cpelland, hkataria, jhardy, mfeifer, mpovolny, obarenbo, simaishi, ssainkar, tcarlin
Target Milestone: GA   
Target Release: 5.5.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: 5.5.0.11 Doc Type: Bug Fix
Doc Text:
Datastore scans are only supported against datastores belonging to a VMware provider. However, in the previous CloudForms release, the scan option in the web user interface displayed for datastores from all sources. As a result, initiating a SmartState Analysis scan on a non-VMware datastore returned an error. With this release, code was added to only allow SmartState Analysis for VMware storage records in the web user interface. As a result, the SmartState Analysis button now only shows when using a VMware datastore.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-08 13:44:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Josh Carter 2015-11-05 14:39:21 UTC
Description of problem:

The option to scan a datastore should only be displayed if the datstore itself 
belongs to a vmware provider. Currently datastore scans are only supported 
against VMWare datastores. 

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 4 CFME Bot 2015-11-13 21:33:02 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/72a871c7766a6596ca5c99742fd365b195f49124

commit 72a871c7766a6596ca5c99742fd365b195f49124
Author:     Harpreet Kataria <hkataria>
AuthorDate: Thu Nov 12 21:57:38 2015 -0500
Commit:     Harpreet Kataria <hkataria>
CommitDate: Fri Nov 13 12:58:59 2015 -0500

    Added code to only allow SSA for vmware storage records.
    
    - Added similar approach that is implementd for vm_or_template records to limit smartstate analysis task for vmware storage records only.
    - Added spec tests to verify the fix
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1278463

 .../application_controller/ci_processing.rb        |  5 ++++
 app/controllers/storage_controller.rb              |  2 +-
 app/helpers/application_helper/toolbar_builder.rb  |  2 ++
 app/models/storage.rb                              | 29 ++++++++++++++++++
 .../application_helper/toolbar_builder_spec.rb     | 25 ++++++++++++++++
 spec/models/storage_spec.rb                        | 34 ++++++++++++++++++++++
 6 files changed, 96 insertions(+), 1 deletion(-)

Comment 6 CFME Bot 2015-11-16 21:18:40 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=c10f85e4bd3a79d00212d083796dd98b7ccef8b8

commit c10f85e4bd3a79d00212d083796dd98b7ccef8b8
Author:     Harpreet Kataria <hkataria>
AuthorDate: Thu Nov 12 21:57:38 2015 -0500
Commit:     Harpreet Kataria <hkataria>
CommitDate: Fri Nov 13 16:44:04 2015 -0500

    Added code to only allow SSA for vmware storage records.
    
    - Added similar approach that is implementd for vm_or_template records to limit smartstate analysis task for vmware storage records only.
    - Added spec tests to verify the fix
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1278463
    (cherry picked from commit 72a871c)

 .../application_controller/ci_processing.rb        |  5 ++++
 app/controllers/storage_controller.rb              |  2 +-
 app/helpers/application_helper/toolbar_builder.rb  |  2 ++
 app/models/storage.rb                              | 29 ++++++++++++++++++
 .../application_helper/toolbar_builder_spec.rb     | 25 ++++++++++++++++
 spec/models/storage_spec.rb                        | 34 ++++++++++++++++++++++
 6 files changed, 96 insertions(+), 1 deletion(-)

Comment 7 CFME Bot 2015-11-16 21:19:37 UTC
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=afeb1d6d8b701efee51ec39b8b9a0370f833fcfe

commit afeb1d6d8b701efee51ec39b8b9a0370f833fcfe
Merge: 418fc0a c10f85e
Author:     Dan Clarizio <dclarizi>
AuthorDate: Mon Nov 16 10:06:11 2015 -0500
Commit:     Dan Clarizio <dclarizi>
CommitDate: Mon Nov 16 10:06:11 2015 -0500

    Merge branch '55z_bz_1278463' into '5.5.z'
    
    Added code to only allow SSA for vmware storage records.
    
    - Added similar approach that is implementd for vm_or_template records to limit smartstate analysis task for vmware storage records only.
    - Added spec tests to verify the fix
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1278463
    (cherry picked from commit 72a871c)
    
    @dclarizi please review, clean cherry-pick for https://github.com/ManageIQ/manageiq/pull/5421
    
    See merge request !453

 .../application_controller/ci_processing.rb        |  5 ++++
 app/controllers/storage_controller.rb              |  2 +-
 app/helpers/application_helper/toolbar_builder.rb  |  2 ++
 app/models/storage.rb                              | 29 ++++++++++++++++++
 .../application_helper/toolbar_builder_spec.rb     | 25 ++++++++++++++++
 spec/models/storage_spec.rb                        | 34 ++++++++++++++++++++++
 6 files changed, 96 insertions(+), 1 deletion(-)

Comment 8 Ramesh A 2015-11-19 14:38:50 UTC
Good to go.  Verified and working fine in 5.5.0.11-rc1.20151117182049_653c0d4

Perform SmartState Analysis is disabled for datastores which doesnot belong to vsphere.  

If Datastores are selected from the Datastore list page by checking the checkbox, and click on Configuration ==> Perform SmartState Analysis, following error message is displayed in "Smartstate Analysis does not apply to at least one of the selected Datastores" in web-ui and evm.log file

evm.log:
========
"[----] E, [2015-11-19T09:14:45.101730 #1139:8e3988] ERROR -- : MIQ(storage_controller-button): Smartstate Analysis does not apply to at least one of the selected Datastores"

Comment 10 errata-xmlrpc 2015-12-08 13:44:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:2551

Comment 11 Greg Blomquist 2016-01-07 20:59:44 UTC
*** Bug 1180467 has been marked as a duplicate of this bug. ***

Comment 12 Dayle Parker 2016-01-14 01:10:54 UTC
Clarified doc text following translation team's feedback.