Description of problem: when a service retirement is initiated by API the retiremement fails at check_service_retirement on an unknown method error Version-Release number of selected component (if applicable): 5.10.2 How reproducible: customer environment Steps to Reproduce: 1.provision a service 2.issue retirement using an api call 3. Actual results: [----] I, [2019-04-09T13:26:12.483126 #5572:900f60] INFO -- : Updated namespace [miqaedb:/Service/Retirement/StateMachines/Methods/CheckServiceRetired#create ManageIQ/Service/Retirement/StateMachines] [----] I, [2019-04-09T13:26:12.586375 #5572:900f60] INFO -- : Updated namespace [Service/Retirement/StateMachines/Methods/check_service_retired ManageIQ/Service/Retirement/StateMachines] [----] I, [2019-04-09T13:26:12.593123 #5572:900f60] INFO -- : Invoking [inline] method [/ManageIQ/Service/Retirement/StateMachines/Methods/check_service_retired] with inputs [{}] [----] I, [2019-04-09T13:26:12.594178 #5572:900f60] INFO -- : <AEMethod [/ManageIQ/Service/Retirement/StateMachines/Methods/check_service_retired]> Starting [----] I, [2019-04-09T13:26:12.995751 #5572:b7a7dc] INFO -- : <AEMethod check_service_retired> Checking if all service tasks have been retired. [----] E, [2019-04-09T13:26:12.996947 #5572:b7a7dc] ERROR -- : <AEMethod check_service_retired> The following error occurred during method evaluation: [----] E, [2019-04-09T13:26:12.997873 #5572:b7a7dc] ERROR -- : <AEMethod check_service_retired> NoMethodError: undefined method `[]' for nil:NilClass [----] E, [2019-04-09T13:26:12.999176 #5572:b7a7dc] ERROR -- : <AEMethod check_service_retired> /ManageIQ/Service/Retirement/StateMachines/Methods/check_service_retired:21:in `check_all_service_tasks' /ManageIQ/Service/Retirement/StateMachines/Methods/check_service_retired:14:in `main' [----] E, [2019-04-09T13:26:13.008777 #5572:b7a7dc] ERROR -- : Method STDERR: /ManageIQ/Service/Retirement/StateMachines/Methods/check_service_retired:21:in `check_all_service_tasks': undefined method `[]' for nil:NilClass (NoMethodError) [----] E, [2019-04-09T13:26:13.009180 #5572:b7a7dc] ERROR -- : Method STDERR: from /ManageIQ/Service/Retirement/StateMachines/Methods/check_service_retired:14:in `main' [----] E, [2019-04-09T13:26:13.009656 #5572:b7a7dc] ERROR -- : Method STDERR: from /ManageIQ/Service/Retirement/StateMachines/Methods/check_service_retired:54:in `<main>' [----] I, [2019-04-09T13:26:13.038960 #5572:900f60] INFO -- : <AEMethod [/ManageIQ/Service/Retirement/StateMachines/Methods/check_service_retired]> Ending [----] E, [2019-04-09T13:26:13.039459 #5572:900f60] ERROR -- : Aborting instantiation (unknown method return code) because [Method exited with rc=Unknown RC: [1]] [----] E, [2019-04-09T13:26:13.039944 #5572:900f60] ERROR -- : State=<CheckServiceRetired> running raised exception: <Method exited with rc=Unknown RC: [1]> [----] W, [2019-04-09T13:26:13.040121 #5572:900f60] WARN -- : Error in State=[CheckServiceRetired] [----] I, [2019-04-09T13:26:13.040315 #5572:900f60] INFO -- : In State=[CheckServiceRetired], invoking [on_error] method=[update_service_retirement_status(status => 'Error Checking Service retirement')] [----] I, [2019-04-09T13:26:13.195715 #5572:900f60] INFO -- : Updated namespace [Service/Retirement/StateMachines/ServiceRetirement/update_service_retirement_status ManageIQ/Service/Retirement/StateMachines] [----] I, [2019-04-09T13:26:13.507689 #5572:900f60] INFO -- : Invoking [inline] method [/ManageIQ/Service/Retirement/StateMachines/ServiceRetirement/update_service_retirement_status] with inputs [{"status"=>"Error Checking Service retirement"}] [----] I, [2019-04-09T13:26:13.509050 #5572:900f60] INFO -- : <AEMethod [/ManageIQ/Service/Retirement/StateMachines/ServiceRetirement/update_service_retirement_status]> Starting [----] E, [2019-04-09T13:26:13.987415 #5572:ac0bf98] ERROR -- : <AEMethod update_service_retirement_status> The following error occurred during method evaluation: [----] E, [2019-04-09T13:26:13.989840 #5572:ac0bf98] ERROR -- : <AEMethod update_service_retirement_status> NoMethodError: undefined method `miq_request' for nil:NilClass [----] E, [2019-04-09T13:26:13.992815 #5572:ac0bf98] ERROR -- : <AEMethod update_service_retirement_status> /ManageIQ/Service/Retirement/StateMachines/ServiceRetirement/update_service_retirement_status:19:in `main' [----] E, [2019-04-09T13:26:14.002042 #5572:ac0bf98] ERROR -- : Method STDERR: /ManageIQ/Service/Retirement/StateMachines/ServiceRetirement/update_service_retirement_status:19:in `main': undefined method `miq_request' for nil:NilClass (NoMethodError) [----] E, [2019-04-09T13:26:14.002547 #5572:ac0bf98] ERROR -- : Method STDERR: from /ManageIQ/Service/Retirement/StateMachines/ServiceRetirement/update_service_retirement_status:49:in `<main>' [----] I, [2019-04-09T13:26:14.030307 #5572:900f60] INFO -- : <AEMethod [/ManageIQ/Service/Retirement/StateMachines/ServiceRetirement/update_service_retirement_status]> Ending [----] E, [2019-04-09T13:26:14.030687 #5572:900f60] ERROR -- : State=<CheckServiceRetired> running on_error raised exception: <Method exited with rc=Unknown RC: [1]> Expected results: retirement proceeds as normal Additional info: does not affect retirements started from the UI. API retirements started with POST POST /api/services/<<id>> { "action" : "retire" }
Hi Felix, It looks the customer is using the old api call. Could you ask them to use the action request_retire as shown below: POST POST /api/services/<<id>> { "action" : "request_retire" } Thanks, Tina
the customer reports that the new api isn't in any documentation and believes that calls to the previous api should return a warning that this is depredicated and end without doing anything else. I'll open a bug for the documentation side. two documents are affected.
Closing this bug as the issue is documentation and a separate BZ was opened for that.
I would argue that the "retire" action is still exposed and should be removed.
Hi Felix, The 'retire' action is still valid, and needed for customers using custom Automation code. Thanks, Tina
(In reply to Tina Fitzgerald from comment #9) > Hi Felix, > > The 'retire' action is still valid, and needed for customers using custom > Automation code. > > Thanks, > Tina in the case of this customer, using retire caused retirements to fail. they stopped failing when using request_retire. see the opening message for details
Tina says comment 13 is resolved by https://github.com/ManageIQ/manageiq-content/pull/530
PR referenced in Comment 15 has been merged and back ported to Hammer.
Hi Satoe, Felix, I dont think we need to open a new bug, since the problem and solution are covered here: https://bugzilla.redhat.com/show_bug.cgi?id=1698480 My vote would be to close this ticket. Felix, are you okay with that? Thanks, Tina
I think so yeah. in fact the case might be one we can close too, same customer...