Bug 1349989

Summary: Services: Setting a Retirement Dates/ Retiring for a service shows error in log
Product: Red Hat CloudForms Management Engine Reporter: John Prause <jprause>
Component: UI - OPSAssignee: Harpreet Kataria <hkataria>
Status: CLOSED ERRATA QA Contact: Shveta <sshveta>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.6.0CC: dclarizi, hkataria, jhardy, mpovolny, nansari, obarenbo, sshveta
Target Milestone: GAKeywords: ZStream
Target Release: 5.6.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: service:catalog
Fixed In Version: 5.6.1.2 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1344678 Environment:
Last Closed: 2016-08-18 17:52:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1344678    
Bug Blocks:    

Comment 1 CFME Bot 2016-07-11 20:07:13 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/729ea14edcb9dd56432754a849ab5eee39d0642d

commit 729ea14edcb9dd56432754a849ab5eee39d0642d
Author:     Harpreet Kataria <hkataria>
AuthorDate: Wed Jul 6 16:38:20 2016 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Fri Jul 8 08:52:07 2016 -0400

    Use SupportsFeatureMixin to interrogate a vm/template
    
    Adjusted a spec test, to make sure vm in the test is not orphaned/archived
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1344678
    https://bugzilla.redhat.com/show_bug.cgi?id=1349989

 app/controllers/application_controller/ci_processing.rb |  7 ++++---
 app/models/miq_template.rb                              |  4 ----
 app/models/vm.rb                                        |  4 ----
 app/models/vm/operations.rb                             |  2 ++
 app/models/vm/operations/lifecycle.rb                   | 10 ++++++++++
 app/models/vm_or_template.rb                            |  7 +++----
 spec/controllers/ems_common_controller_spec.rb          |  5 ++++-
 7 files changed, 23 insertions(+), 16 deletions(-)

Comment 2 CFME Bot 2016-07-11 20:07:22 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/f4cb6ebb6aead57a323b00bd3155cf57aeb9114a

commit f4cb6ebb6aead57a323b00bd3155cf57aeb9114a
Author:     Harpreet Kataria <hkataria>
AuthorDate: Fri Jun 17 09:40:14 2016 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Fri Jul 8 08:52:07 2016 -0400

    Check if record supports retirement task only for VM or Template records
    
    Made changes to code to not check for retirement task eligibility for Service & Orchestration template records. This check should only be for VmOrTemplate records. Added model methods to check if record type supports retirement. Having service record with a same id as a MiqTemple record in database was causing an issue while trying to retire the service and incorrectly going thru the code path trying to render a flash message that "Retire does not apply to selected xxxx"
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1344678
    https://bugzilla.redhat.com/show_bug.cgi?id=1349989

 .../application_controller/ci_processing.rb        |  7 +--
 app/models/miq_template.rb                         |  4 ++
 app/models/vm.rb                                   |  4 ++
 app/models/vm_or_template.rb                       |  4 ++
 .../application_controller/ci_processing_spec.rb   | 56 ++++++++++++++++++++++
 5 files changed, 72 insertions(+), 3 deletions(-)

Comment 3 CFME Bot 2016-07-11 20:07:31 UTC
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/2cd9acb50750c28f6fe5328f1be4fae1e4bfd14c

commit 2cd9acb50750c28f6fe5328f1be4fae1e4bfd14c
Author:     Harpreet Kataria <hkataria>
AuthorDate: Thu Jul 7 10:16:23 2016 -0400
Commit:     Harpreet Kataria <hkataria>
CommitDate: Fri Jul 8 08:55:52 2016 -0400

    Addressed rubocop comments
    
    Removed an extra - include SupportsFeatureMixin
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1344678
    https://bugzilla.redhat.com/show_bug.cgi?id=1349989

 app/controllers/application_controller/ci_processing.rb       |  6 +++---
 app/models/vm/operations/lifecycle.rb                         |  2 +-
 app/models/vm_or_template.rb                                  |  3 +--
 spec/controllers/application_controller/ci_processing_spec.rb | 10 ++++++----
 spec/controllers/ems_common_controller_spec.rb                |  2 +-
 5 files changed, 12 insertions(+), 11 deletions(-)

Comment 4 Harpreet Kataria 2016-07-12 19:23:26 UTC
waiting for https://github.com/ManageIQ/manageiq/pull/9272 to be back-ported

Comment 6 Shveta 2016-08-01 22:12:42 UTC
No error on retiring services.
Verified in 

5.6.1.0.20160726144018_810a94f

Comment 7 Harpreet Kataria 2016-08-05 17:05:35 UTC
*** Bug 1361690 has been marked as a duplicate of this bug. ***

Comment 9 errata-xmlrpc 2016-08-18 17:52:00 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://rhn.redhat.com/errata/RHSA-2016-1634.html