Bug 1465415

Summary: Service Retirement not working properly for Orchestration Stacks due to missing zone.
Product: Red Hat CloudForms Management Engine Reporter: Satoe Imaishi <simaishi>
Component: ControlAssignee: Tina Fitzgerald <tfitzger>
Status: CLOSED ERRATA QA Contact: Shveta <sshveta>
Severity: high Docs Contact:
Priority: high    
Version: 5.7.0CC: cpelland, gekis, jhardy, jocarter, lkhomenk, myoder, obarenbo, tfitzger, vaclav.miller
Target Milestone: GAKeywords: ZStream
Target Release: 5.7.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: stack:service:retirement
Fixed In Version: 5.7.4.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1458011 Environment:
Last Closed: 2017-12-18 20:26:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On: 1458011    
Bug Blocks:    

Comment 2 CFME Bot 2017-06-30 19:55:54 UTC
New commit detected on ManageIQ/manageiq/euwe:
https://github.com/ManageIQ/manageiq/commit/fa669b4d02a4b334cded5644592d88cfa7feab2b

commit fa669b4d02a4b334cded5644592d88cfa7feab2b
Author:     Greg McCullough <gmccullo>
AuthorDate: Thu Jun 8 10:43:30 2017 -0400
Commit:     Satoe Imaishi <simaishi>
CommitDate: Fri Jun 30 15:49:40 2017 -0400

    Merge pull request #15334 from tinaafitz/orchestration_stack_add_zone
    
    Add orchestration stack my_zone.
    (cherry picked from commit 8e6d2fb05a36be637183b083efafbe7904f58e8d)
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1465415

 app/models/orchestration_stack.rb         |  4 ++++
 spec/models/service_orchestration_spec.rb | 11 +++++++++++
 2 files changed, 15 insertions(+)

Comment 3 Shveta 2017-09-27 23:06:26 UTC
Provision a service with VM in default zone.
Once the service is provisioned .Switch the provider to new zone.
retire service .
Log message do not show request_service_retire queue put in the correct zone "newzone".

Appliance : https://10.8.196.251

Tina pls check.

Logs 
==================

[----] I, [2017-09-27T19:03:10.995267 #2049:51f130]  INFO -- : MiqAeEvent.build_evm_event >> event=<"request_service_retire"> inputs=<{:retirement_initiator=>"user", :service=>#<ServiceOrchestration id: 1, name: "SlFz309m7H", description: "my catalog", guid: "58c2da2e-a3d6-11e7-b601-001a4a481421", type: "ServiceOrchestration", service_template_id: 1, options: {:dialog=>{"dialog_tenant_name"=>"", "dialog_stack_name"=>"test-stack-NTvbvdBbJh", "dialog_stack_onfailure"=>"ROLLBACK", "dialog_stack_timeout"=>20, "dialog_service_name"=>"SlFz309m7H", "dialog_param_KeyName"=>"dave", "dialog_param_virtualMachineName"=>"test-stk-NTvbvdBbJh", "dialog_param_InstanceType"=>"m1.small", "dialog_param_SSHLocation"=>"0.0.0.0/0"}, :orchestration_stack=>{"name"=>"test-stack-NTvbvdBbJh", "type"=>"ManageIQ::Providers::Amazon::CloudManager::OrchestrationStack", "status"=>"CREATE_IN_PROGRESS", "ems_ref"=>"arn:aws:cloudformation:us-west-1:389787642310:stack/test-stack-NTvbvdBbJh/62597c50-a3d6-11e7-b7ff-504dceee45c5", "ems_id"=>1, "orchestration_template_id"=>67, "created_at"=>Wed, 27 Sep 2017 22:51:23 UTC +00:00, "updated_at"=>Wed, 27 Sep 2017 22:51:23 UTC +00:00}, :create_options=>{:parameters=>{"KeyName"=>"dave", "virtualMachineName"=>"test-stk-NTvbvdBbJh", "InstanceType"=>"m1.small", "SSHLocation"=>"0.0.0.0/0"}, :on_failure=>"ROLLBACK", :timeout_in_minutes=>20}}, display: true, created_at: "2017-09-27 22:51:06", updated_at: "2017-09-27 23:03:10", evm_owner_id: 1, miq_group_id: 3, retired: nil, retires_on: "2017-09-27 00:00:00", retirement_warn: 0, retirement_last_warn: "2017-09-27 22:59:27", retirement_state: nil, retirement_requester: "admin", tenant_id: 2, ancestry: nil>, :userid=>"admin", :type=>"ServiceOrchestration", "MiqEvent::miq_event"=>508, :miq_event_id=>508, "EventStream::event_stream"=>508, :event_stream_id=>508}>
[----] I, [2017-09-27T19:01:00.851835 #2049:51f130]  INFO -- : MiqAeEvent.build_evm_event >> event=<"request_service_retire"> inputs=<{:retirement_initiator=>"user", :service=>#<ServiceOrchestration id: 1, name: "SlFz309m7H", description: "my catalog", guid: "58c2da2e-a3d6-11e7-b601-001a4a481421", type: "ServiceOrchestration", service_template_id: 1, options: {:dialog=>{"dialog_tenant_name"=>"", "dialog_stack_name"=>"test-stack-NTvbvdBbJh", "dialog_stack_onfailure"=>"ROLLBACK", "dialog_stack_timeout"=>20, "dialog_service_name"=>"SlFz309m7H", "dialog_param_KeyName"=>"dave", "dialog_param_virtualMachineName"=>"test-stk-NTvbvdBbJh", "dialog_param_InstanceType"=>"m1.small", "dialog_param_SSHLocation"=>"0.0.0.0/0"}, :orchestration_stack=>{"name"=>"test-stack-NTvbvdBbJh", "type"=>"ManageIQ::Providers::Amazon::CloudManager::OrchestrationStack", "status"=>"CREATE_IN_PROGRESS", "ems_ref"=>"arn:aws:cloudformation:us-west-1:389787642310:stack/test-stack-NTvbvdBbJh/62597c50-a3d6-11e7-b7ff-504dceee45c5", "ems_id"=>1, "orchestration_template_id"=>67, "created_at"=>Wed, 27 Sep 2017 22:51:23 UTC +00:00, "updated_at"=>Wed, 27 Sep 2017 22:51:23 UTC +00:00}, :create_options=>{:parameters=>{"KeyName"=>"dave", "virtualMachineName"=>"test-stk-NTvbvdBbJh", "InstanceType"=>"m1.small", "SSHLocation"=>"0.0.0.0/0"}, :on_failure=>"ROLLBACK", :timeout_in_minutes=>20}}, display: true, created_at: "2017-09-27 22:51:06", updated_at: "2017-09-27 23:01:00", evm_owner_id: 1, miq_group_id: 3, retired: nil, retires_on: "2017-09-27 00:00:00", retirement_warn: 0, retirement_last_warn: "2017-09-27 22:59:27", retirement_state: nil, retirement_requester: "admin", tenant_id: 2, ancestry: nil>, :userid=>"admin", :type=>"ServiceOrchestration", "MiqEvent::miq_event"=>506, :miq_event_id=>506, "EventStream::event_stream"=>506, :event_stream_id=>506}>

Comment 4 Shveta 2017-09-28 17:56:43 UTC
Tried again. 

Correct message was shown in logs .
[----] I, [2017-09-28T13:55:12.245291 #4727:51f130]  INFO -- : MiqAeEvent.build_evm_event >> event=<"request_service_retire"> inputs=<{:retirement_initiator=>"user", :service=>#<Service id: 4, name: "zone", description: "my catalog", guid: "5027216e-a475-11e7-b601-001a4a481421", type: nil, service_template_id: 2, options: {:dialog=>{"dialog_service_name"=>"zone"}}, display: true, created_at: "2017-09-28 17:49:02", updated_at: "2017-09-28 17:55:12", evm_owner_id: 1, miq_group_id: 3, retired: nil, retires_on: nil, retirement_warn: nil, retirement_last_warn: nil, retirement_state: nil, retirement_requester: "admin", tenant_id: 2, ancestry: nil>, :userid=>"admin", :type=>"Service", "MiqEvent::miq_event"=>1657, :miq_event_id=>1657, "EventStream::event_stream"=>1657, :event_stream_id=>1657}>


Verified in 5.7.4.0.20170913182424_63a1e18

Comment 7 errata-xmlrpc 2017-12-18 20:26:17 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-2017:3484