This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1271359 - [RHEL-OSP] SmartState Analysis of Archived Instances fail
[RHEL-OSP] SmartState Analysis of Archived Instances fail
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS (Show other bugs)
5.4.0
Unspecified Unspecified
medium Severity medium
: GA
: 5.5.0
Assigned To: Harpreet Kataria
Milan Falešník
:
: 1226399 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-13 14:25 EDT by Thom Carlin
Modified: 2015-12-08 08:38 EST (History)
9 users (show)

See Also:
Fixed In Version: 5.5.0.11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-12-08 08:38:12 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Thom Carlin 2015-10-13 14:25:19 EDT
Description of problem:

Unable to analyze Archived Instances.

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

5.4.3.0.20151001120745_d11cf59

How reproducible:

100%

Steps to Reproduce:
1. Define OpenStack provider
2. Perform SmartState Analysis of Archived Instances
3.

Actual results:

Error message
Unsuccessful analysis

Expected results:

No message
Successful analysis

Additional info:

action-abort: job aborting, No Cloud/Infrastructure Provider available to create snapshot,
 skipping

Either succesfully analyzing the instance or removing analysis as an option would be acceptable solutions.
Comment 2 Harpreet Kataria 2015-10-15 10:34:21 EDT
Rich,

UI calls "process_task" method in app/models/mixins/process_tasks_mixin.rb that further calls invoke_tasks_queue to put task on queues with options, options being passed in are: options = {:ids=>["1000000002016"], :task=>"scan", :userid=>"admin"} where ids is an array of VM ids to be scanned.
Let me know if you have further questions.

~Harpreet
Comment 3 Harpreet Kataria 2015-10-15 11:40:54 EDT
Rich,
As discussed we need new model methods "validate_scan" that UI will call to see if a selected VM or Instance can be scanned, if not then show appropriate flash message on screen or proceed with the task. See "validate_migrate" model methods for example, those were added to check availability of Migrate task for selected VMs.
Please reassign this ticket back to me for UI work once model methods are in.
Let me know if you have any questions.

Thanks,
~Harpreet.
Comment 4 CFME Bot 2015-10-16 18:52:14 EDT
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/a19134670bbf86f3860e3b4ff23c48acf49a8983

commit a19134670bbf86f3860e3b4ff23c48acf49a8983
Author:     Richard Oliveri <roliveri@redhat.com>
AuthorDate: Fri Oct 16 16:25:30 2015 -0400
Commit:     Richard Oliveri <roliveri@redhat.com>
CommitDate: Fri Oct 16 16:25:30 2015 -0400

    Add check for archived VMs for UI.
    
    In the validate_smartstate_analysis methods, check for archived and orphaned VMs,
    so the UI won't allow scanning of those VMs.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1271359

 app/models/manageiq/providers/cloud_manager/vm.rb           |  2 +-
 app/models/manageiq/providers/openstack/cloud_manager/vm.rb |  2 +-
 app/models/manageiq/providers/redhat/infra_manager/vm.rb    |  2 +-
 app/models/manageiq/providers/vmware/infra_manager/vm.rb    |  2 +-
 app/models/vm_or_template.rb                                | 11 +++++++++++
 5 files changed, 15 insertions(+), 4 deletions(-)
Comment 5 Rich Oliveri 2015-10-16 20:56:48 EDT
Harpreet, I'm not sure if there's any additional work that needs to be done on your part. If not, just set it to POST.
Comment 6 Harpreet Kataria 2015-10-20 18:32:42 EDT
Rich,

validate_supported_check method should return available as false for the VMs that do not support smartstate analysis task along with a message that indicates why the task is not available. It should return available => true with no message when task is supported for selected VM.

Can you also add validate_smartstate_analysis method to scvmm vm model, I am getting undefined method `validate_smartstate_analysis' for #<ManageIQ::Providers::Microsoft::InfraManager::Vm:0x00000005543350> [vm_infra/x_show] when trying to go to SCVMM VM summary screen.

Let me know if you have questions.

Thanks,
~Harpreet
Comment 8 CFME Bot 2015-11-10 15:59:06 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/0e0d472155cb0b9b7e42e4249af1e1aa97df10f0

commit 0e0d472155cb0b9b7e42e4249af1e1aa97df10f0
Author:     Richard Oliveri <roliveri@redhat.com>
AuthorDate: Fri Oct 30 15:21:01 2015 -0400
Commit:     Richard Oliveri <roliveri@redhat.com>
CommitDate: Fri Oct 30 15:21:01 2015 -0400

    validate_supported_check should return :available => false when SSA is not supported.
    
    Also define a default superclass validate_smartstate_analysis that must be
    overridden by subclasses that support SSA.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1271359

 app/models/vm_or_template.rb          | 2 +-
 app/models/vm_or_template/scanning.rb | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
Comment 10 Rich Oliveri 2015-11-11 17:06:52 EST
*** Bug 1226399 has been marked as a duplicate of this bug. ***
Comment 11 CFME Bot 2015-11-11 18:08:27 EST
Detected commit referencing this ticket while ticket status is POST.
Comment 16 CFME Bot 2015-11-12 12:10:23 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/b8c4f97730104845738ffd6c97fd4446284a064f

commit b8c4f97730104845738ffd6c97fd4446284a064f
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Tue Nov 10 17:28:49 2015 -0500
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Wed Nov 11 10:27:58 2015 -0500

    Display message when one of the selected instance do not support SSA.
    
    - Display flash message one of the selected Instances do not support Smartstate Analysis Task. Backed support is added in https://github.com/ManageIQ/manageiq/pull/5210
    - Updated render_flash_not_applicable_to_model method to capitalize 'type' when there is space in it such as "smartstate analysis"
    - Added spec test to verify fix
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1271359

 app/controllers/application_controller.rb           |  2 +-
 .../application_controller/ci_processing.rb         |  5 +++++
 .../application_controller/ci_processing_spec.rb    | 21 +++++++++++++++++++++
 3 files changed, 27 insertions(+), 1 deletion(-)
Comment 17 CFME Bot 2015-11-12 15:30:52 EST
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=dd80e6315ec27bba97ae63216e9030756c0f1cb9

commit dd80e6315ec27bba97ae63216e9030756c0f1cb9
Author:     Richard Oliveri <roliveri@redhat.com>
AuthorDate: Fri Oct 30 15:21:01 2015 -0400
Commit:     Richard Oliveri <roliveri@redhat.com>
CommitDate: Tue Nov 10 16:04:39 2015 -0500

    validate_supported_check should return :available => false when SSA is not supported.
    
    Also define a default superclass validate_smartstate_analysis that must be
    overridden by subclasses that support SSA.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1271359

 app/models/vm_or_template.rb          | 2 +-
 app/models/vm_or_template/scanning.rb | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
Comment 18 CFME Bot 2015-11-12 15:33:10 EST
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=5a41c1f406305c294f3511cfedac81c4beb67cad

commit 5a41c1f406305c294f3511cfedac81c4beb67cad
Merge: ea09301 4b72718
Author:     Greg Blomquist <gblomqui@redhat.com>
AuthorDate: Wed Nov 11 17:29:46 2015 -0500
Commit:     Greg Blomquist <gblomqui@redhat.com>
CommitDate: Wed Nov 11 17:29:46 2015 -0500

    Merge branch 'archived_check_55z' into '5.5.z'
    
    Check for orphaned and archived VMs in validate_smartstate_analysis.
    
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1271359
    
    Upstream PR: https://github.com/ManageIQ/manageiq/pull/5210
    
    Clean cherry-pick
    
    See merge request !396

 app/models/vm_or_template.rb                            | 15 +++++++--------
 app/models/vm_or_template/scanning.rb                   |  8 ++++++++
 spec/helpers/application_helper/toolbar_builder_spec.rb |  2 ++
 spec/models/vm_or_template_spec.rb                      |  2 ++
 4 files changed, 19 insertions(+), 8 deletions(-)
Comment 21 CFME Bot 2015-11-14 08:20:46 EST
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/2ed16d61fcb2b48b45ef33085761ada3cc1d0cd3

commit 2ed16d61fcb2b48b45ef33085761ada3cc1d0cd3
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Fri Nov 13 16:35:21 2015 -0500
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Fri Nov 13 16:35:21 2015 -0500

    Hide SSA button for Archived VMs.
    
    - Added code to hide SSA button for archived VMs, toolbar button should be hidden when available is false & message is nil.
    - Added spec test to verify fix
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1271359

 app/helpers/application_helper/toolbar_builder.rb       | 1 +
 spec/helpers/application_helper/toolbar_builder_spec.rb | 8 ++++++++
 2 files changed, 9 insertions(+)
Comment 23 CFME Bot 2015-11-16 16:17:13 EST
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=4502cbdfff04e507a5ae9cf2435c9f369a77a0b0

commit 4502cbdfff04e507a5ae9cf2435c9f369a77a0b0
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Tue Nov 10 17:28:49 2015 -0500
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Thu Nov 12 18:44:10 2015 -0500

    Display message when one of the selected instance do not support SSA.
    
    - Display flash message one of the selected Instances do not support Smartstate Analysis Task. Backed support is added in https://github.com/ManageIQ/manageiq/pull/5210
    - Updated render_flash_not_applicable_to_model method to capitalize 'type' when there is space in it such as "smartstate analysis"
    - Added spec test to verify fix
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1271359
    (cherry picked from commit b8c4f97)

 app/controllers/application_controller.rb           |  2 +-
 .../application_controller/ci_processing.rb         |  5 +++++
 .../application_controller/ci_processing_spec.rb    | 21 +++++++++++++++++++++
 3 files changed, 27 insertions(+), 1 deletion(-)
Comment 24 CFME Bot 2015-11-16 16:17:51 EST
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=c41051a801578bcd2b81c8071ab1bb57b44b6d62

commit c41051a801578bcd2b81c8071ab1bb57b44b6d62
Merge: faaf1ba 4502cbd
Author:     Dan Clarizio <dclarizi@redhat.com>
AuthorDate: Fri Nov 13 13:28:44 2015 -0500
Commit:     Dan Clarizio <dclarizi@redhat.com>
CommitDate: Fri Nov 13 13:28:44 2015 -0500

    Merge branch '55z_bz_1271359' into '5.5.z'
    
    Display message when one of the selected instance do not support SSA.
    
    - Display flash message one of the selected Instances do not support Smartstate Analysis Task. Backed support is added in https://github.com/ManageIQ/manageiq/pull/5210
    - Updated render_flash_not_applicable_to_model method to capitalize 'type' when there is space in it such as "smartstate analysis"
    - Added spec test to verify fix
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1271359
    (cherry picked from commit b8c4f97)
    
    @dclarizi please review, this is a clean cherry-pick from https://github.com/ManageIQ/manageiq/pull/5378
    
    See merge request !434

 app/controllers/application_controller.rb           |  2 +-
 .../application_controller/ci_processing.rb         |  5 +++++
 .../application_controller/ci_processing_spec.rb    | 21 +++++++++++++++++++++
 3 files changed, 27 insertions(+), 1 deletion(-)
Comment 25 CFME Bot 2015-11-16 16:19:30 EST
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=b41a23680ac9f6fdbf88bcc99442e38b1cfbf263

commit b41a23680ac9f6fdbf88bcc99442e38b1cfbf263
Author:     Harpreet Kataria <hkataria@redhat.com>
AuthorDate: Fri Nov 13 16:35:21 2015 -0500
Commit:     Harpreet Kataria <hkataria@redhat.com>
CommitDate: Mon Nov 16 09:08:13 2015 -0500

    Hide SSA button for Archived VMs.
    
    - Added code to hide SSA button for archived VMs, toolbar button should be hidden when available is false & message is nil.
    - Added spec test to verify fix
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1271359
    (cherry picked from commit 2ed16d6)

 app/helpers/application_helper/toolbar_builder.rb       | 1 +
 spec/helpers/application_helper/toolbar_builder_spec.rb | 8 ++++++++
 2 files changed, 9 insertions(+)
Comment 26 CFME Bot 2015-11-16 16:20:00 EST
New commit detected on cfme/5.5.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=f5da066f08c935dfe8d94def0af7f8802aa5eb62

commit f5da066f08c935dfe8d94def0af7f8802aa5eb62
Merge: a67ddd1 b41a236
Author:     Dan Clarizio <dclarizi@redhat.com>
AuthorDate: Mon Nov 16 10:54:37 2015 -0500
Commit:     Dan Clarizio <dclarizi@redhat.com>
CommitDate: Mon Nov 16 10:54:37 2015 -0500

    Merge branch '55z_pr_5543' into '5.5.z'
    
    Hide SSA button for Archived VMs.
    
    - Added code to hide SSA button for archived VMs, toolbar button should be hidden when available is false & message is nil.
    - Added spec test to verify fix
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1271359
    (cherry picked from commit 2ed16d6)
    
    @dclarizi please merge, this is clean cherry-pick for https://github.com/ManageIQ/manageiq/pull/5443
    
    See merge request !462

 app/helpers/application_helper/toolbar_builder.rb       | 1 +
 spec/helpers/application_helper/toolbar_builder_spec.rb | 8 ++++++++
 2 files changed, 9 insertions(+)
Comment 27 Milan Falešník 2015-11-20 09:16:39 EST
Verified in 5.5.0.11, it is no longer possible to use the SSA on an Archived instance. In the details page, the button is not present, if going through the quadicon view, it correctly tells that there is no valid instance for SSA.
Comment 29 errata-xmlrpc 2015-12-08 08:38:12 EST
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

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