Bug 1713477 - service bundle retirement requests that hit an error cannot be attempted again due to way the state is handled
Summary: service bundle retirement requests that hit an error cannot be attempted agai...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.10.2
Hardware: All
OS: All
urgent
urgent
Target Milestone: GA
: 5.10.5
Assignee: Tina Fitzgerald
QA Contact: Niyaz Akhtar Ansari
Red Hat CloudForms Documentation
URL:
Whiteboard:
Depends On: 1698480
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-23 19:53 UTC by Satoe Imaishi
Modified: 2022-07-09 10:37 UTC (History)
11 users (show)

Fixed In Version: 5.10.5.1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1698480
Environment:
Last Closed: 2019-06-11 05:32:47 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1698116 0 high CLOSED service bundle retirement initiated by API fails at check_service_retirement on an unknown method error 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHSA-2019:1429 0 None None None 2019-06-11 05:33:06 UTC

Comment 2 CFME Bot 2019-05-23 20:01:32 UTC
New commit detected on ManageIQ/manageiq-content/hammer:

https://github.com/ManageIQ/manageiq-content/commit/329fa1ed9bbc2388d793ce6e2c59a6d40a11c193
commit 329fa1ed9bbc2388d793ce6e2c59a6d40a11c193
Author:     tina <tfitzger>
AuthorDate: Thu May 23 14:19:34 2019 -0400
Commit:     tina <tfitzger>
CommitDate: Thu May 23 14:19:34 2019 -0400

    Merge pull request #530 from billfitzgerald0120/retire_api

    Fix Service Retirement requests leaving the Service as 'retiring'.

    (cherry picked from commit ac0a57a8b535b4ce565beb5d51faca9acb5a50af)

    Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1713477

 content/automate/ManageIQ/Service/Retirement/StateMachines/Methods.class/__methods__/start_retirement.rb | 6 +
 content/automate/ManageIQ/Service/Retirement/StateMachines/ServiceRetirement.class/__methods__/update_service_retirement_status.rb | 2 +-
 spec/content/automate/ManageIQ/Service/Retirement/StateMachines/ServiceRetirement.class/__methods__/update_service_retirement_status_spec.rb | 21 +-
 3 files changed, 25 insertions(+), 4 deletions(-)

Comment 4 William Fitzgerald 2019-05-30 14:53:11 UTC
Niyaz,

You need to use the api calls.

1. Create a service
2. Retire the service using the older api call ("retire").  
*** note: only do this once 
3. Check the automation log for the following messages:

ERROR -- : <AEMethod start_retirement> Service retire task not found
ERROR -- : <AEMethod start_retirement> The old style retirement is incompatible with the new retirement state machine.

4. Retire the service using the new api call ("request_retire").
5. Service should retire



Let me know if you have any questions ....

Billy

Comment 5 Niyaz Akhtar Ansari 2019-05-30 18:39:59 UTC
Thanks William for steps.

I can see the the messages after calling ('retire')

I can retire the service using new api call ("request_retire")

verified in Version 5.10.5.1.20190528153822_0501085

Comment 7 errata-xmlrpc 2019-06-11 05:32:47 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-2019:1429

Comment 8 Parthvi Vala 2019-06-17 14:56:12 UTC
This behavior is inconsistent when retiring services for the future.

I created a service and retired it with the old method(retire) and it worked just fine, no error in the log, nothing. I was also able to retire the service with the new method(request_retire).

Also, there is an attribute `request_warn` that doesn't appear when retiring the service with `request_retire`.

Service Retiring (future)
POST /api/services/:id
Query: {
  "action" : :method,
  "resource" : { "date" : "10/30/2015", "warn" : "5" }
}

Any comments on this?


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