Bug 1271359 - [RHEL-OSP] SmartState Analysis of Archived Instances fail
Summary: [RHEL-OSP] SmartState Analysis of Archived Instances fail
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: UI - OPS
Version: 5.4.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: GA
: 5.5.0
Assignee: Harpreet Kataria
QA Contact: Milan Falešník
URL:
Whiteboard:
: 1226399 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-13 18:25 UTC by Thom Carlin
Modified: 2015-12-08 13:38 UTC (History)
9 users (show)

Fixed In Version: 5.5.0.11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-12-08 13:38:12 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1076108 1 None None None 2021-01-20 06:05:38 UTC
Red Hat Bugzilla 1245749 0 medium CLOSED Power ops showing as available for an Archived vm. 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1254636 0 medium CLOSED OpenStack: Archived instances are not shown in the "archive" tree 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHSA-2015:2551 0 normal SHIPPED_LIVE Moderate: CFME 5.5.0 bug fixes and enhancement update 2015-12-08 17:58:09 UTC

Internal Links: 1076108 1245749 1254636

Description Thom Carlin 2015-10-13 18:25:19 UTC
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 14:34:21 UTC
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 15:40:54 UTC
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 22:52:14 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/a19134670bbf86f3860e3b4ff23c48acf49a8983

commit a19134670bbf86f3860e3b4ff23c48acf49a8983
Author:     Richard Oliveri <roliveri>
AuthorDate: Fri Oct 16 16:25:30 2015 -0400
Commit:     Richard Oliveri <roliveri>
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-17 00:56:48 UTC
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 22:32:42 UTC
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 20:59:06 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/0e0d472155cb0b9b7e42e4249af1e1aa97df10f0

commit 0e0d472155cb0b9b7e42e4249af1e1aa97df10f0
Author:     Richard Oliveri <roliveri>
AuthorDate: Fri Oct 30 15:21:01 2015 -0400
Commit:     Richard Oliveri <roliveri>
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 22:06:52 UTC
*** Bug 1226399 has been marked as a duplicate of this bug. ***

Comment 11 CFME Bot 2015-11-11 23:08:27 UTC
Detected commit referencing this ticket while ticket status is POST.

Comment 16 CFME Bot 2015-11-12 17:10:23 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/b8c4f97730104845738ffd6c97fd4446284a064f

commit b8c4f97730104845738ffd6c97fd4446284a064f
Author:     Harpreet Kataria <hkataria>
AuthorDate: Tue Nov 10 17:28:49 2015 -0500
Commit:     Harpreet Kataria <hkataria>
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 20:30:52 UTC
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>
AuthorDate: Fri Oct 30 15:21:01 2015 -0400
Commit:     Richard Oliveri <roliveri>
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 20:33:10 UTC
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>
AuthorDate: Wed Nov 11 17:29:46 2015 -0500
Commit:     Greg Blomquist <gblomqui>
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 13:20:46 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/2ed16d61fcb2b48b45ef33085761ada3cc1d0cd3

commit 2ed16d61fcb2b48b45ef33085761ada3cc1d0cd3
Author:     Harpreet Kataria <hkataria>
AuthorDate: Fri Nov 13 16:35:21 2015 -0500
Commit:     Harpreet Kataria <hkataria>
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 21:17:13 UTC
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>
AuthorDate: Tue Nov 10 17:28:49 2015 -0500
Commit:     Harpreet Kataria <hkataria>
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 21:17:51 UTC
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>
AuthorDate: Fri Nov 13 13:28:44 2015 -0500
Commit:     Dan Clarizio <dclarizi>
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 21:19:30 UTC
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>
AuthorDate: Fri Nov 13 16:35:21 2015 -0500
Commit:     Harpreet Kataria <hkataria>
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 21:20:00 UTC
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>
AuthorDate: Mon Nov 16 10:54:37 2015 -0500
Commit:     Dan Clarizio <dclarizi>
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 14:16:39 UTC
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 13:38:12 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


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