Bug 1283738

Summary: Importing automate model causes invalid URI errors.
Product: Red Hat CloudForms Management Engine Reporter: Josh Carter <jocarter>
Component: AutomateAssignee: mkanoor
Status: CLOSED NOTABUG QA Contact: Dave Johnson <dajohnso>
Severity: high Docs Contact:
Priority: unspecified    
Version: 5.5.0CC: jhardy, jocarter, mkanoor, obarenbo, tfitzger
Target Milestone: GA   
Target Release: 5.5.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-25 15:25:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Josh Carter 2015-11-19 17:12:11 UTC
Description of problem:

Importing an automate model from a 3.2 env into 5.5. beta2 causes invalid URI paths. Only way to correct the issue is to recreate the automate domain & classes. 

[----] I, [2015-11-19T11:42:36.353117 #37145:479988]  INFO -- : Q-task_id([service_template_provision_task_99000000000004]) MIQ(MiqQueue#deliver) Message id: [99000000000401], Delivering...
[----] I, [2015-11-19T11:42:36.354682 #37145:479988]  INFO -- : Q-task_id([service_template_provision_task_99000000000004]) MIQ(MiqAeEngine.deliver) Delivering {"dialog_vm_name"=>"test-2", "dialog_target_post"=>"Germany", "dialog_vm_templ
ate"=>"", "request"=>"clone_to_service"} for object [ServiceTemplateProvisionTask.99000000000004] with state [] to Automate
[----] I, [2015-11-19T11:42:36.358922 #37145:479988]  INFO -- : Q-task_id([service_template_provision_task_99000000000004]) <AutomationEngine> Instantiating [/DoS-Infrastructure/StateMachines/DoS-Provision-VM/DoS-Provision-VM?MiqServer%3A
%3Amiq_server=99000000000001&ServiceTemplateProvisionTask%3A%3Aservice_template_provision_task=99000000000004&User%3A%3Auser=99000000000001&dialog_target_post=Germany&dialog_vm_name=test-2&dialog_vm_template=&object_name=DoS-Provision-VM&
request=clone_to_service&vmdb_object_type=service_template_provision_task]
[----] I, [2015-11-19T11:42:36.449157 #37145:479988]  INFO -- : Q-task_id([service_template_provision_task_99000000000004]) <AutomationEngine> Updated namespace [/DoS-Infrastructure/StateMachines/DoS-Provision-VM/DoS-Provision-VM?MiqServe
r%3A%3Amiq_server=99000000000001&ServiceTemplateProvisionTask%3A%3Aservice_template_provision_task=99000000000004&User%3A%3Auser=99000000000001&dialog_target_post=Germany&dialog_vm_name=test-2&dialog_vm_template=&object_name=DoS-Provision
-VM&request=clone_to_service&vmdb_object_type=service_template_provision_task  Master-Domain/DoS-Infrastructure/StateMachines]
[----] I, [2015-11-19T11:42:36.564020 #37145:479988]  INFO -- : Q-task_id([service_template_provision_task_99000000000004]) <AutomationEngine> Processing State=[ValidateVMName]
[----] I, [2015-11-19T11:42:36.564351 #37145:479988]  INFO -- : Q-task_id([service_template_provision_task_99000000000004]) <AutomationEngine> Following Relationship [miqaedb:ValidateVMName#create]
[----] E, [2015-11-19T11:42:36.564509 #37145:479988] ERROR -- : Q-task_id([service_template_provision_task_99000000000004]) <AutomationEngine> State=<ValidateVMName> running  raised exception: <Invalid URI <miqaedb:ValidateVMName#create>>
[----] W, [2015-11-19T11:42:36.564652 #37145:479988]  WARN -- : Q-task_id([service_template_provision_task_99000000000004]) <AutomationEngine> Error in State=[ValidateVMName]
[----] E, [2015-11-19T11:42:36.565000 #37145:479988] ERROR -- : Q-task_id([service_template_provision_task_99000000000004]) MIQ(MiqAeEngine.deliver) Error delivering {"dialog_vm_name"=>"test-2", "dialog_target_post"=>"Germany", "dialog_vm
_template"=>"", "request"=>"clone_to_service"} for object [ServiceTemplateProvisionTask.99000000000004] with state [] to Automate:
[----] I, [2015-11-19T11:42:36.565176 #37145:479988]  INFO -- : Q-task_id([service_template_provision_task_99000000000004]) MIQ(ServiceTemplateProvisionTask#after_ae_delivery) ae_result="error"
[----] I, [2015-11-19T11:42:36.630336 #37145:479988]  INFO -- : Q-task_id([service_template_provision_task_99000000000004]) Child tasks finished but current task still processing. Setting state to: [finished]...
[----] I, [2015-11-19T11:42:36.644477 #37145:479988]  INFO -- : Q-task_id([service_template_provision_task_99000000000004]) Child tasks finished but current task still processing. Setting state to: [finished]...
[----] I, [2015-11-19T11:42:36.677683 #37145:479988]  INFO -- : Q-task_id([service_template_provision_task_99000000000004]) <AutomationEngine> MiqAeEvent.build_evm_event >> event=<:service_provisioned> inputs=<{"MiqEvent::miq_event"=>9900
0000000024, :miq_event_id=>99000000000024, "EventStream::event_stream"=>99000000000024, :event_stream_id=>99000000000024}>

Version-Release number of selected component (if applicable): 5.5.0.9-beta2.20151102161742_5530c9a 

How reproducible:


Steps to Reproduce:
1. Import automate model
2. Attempt to use the *-Provision-VM state machine.
3.

Actual results:


Expected results:


Additional info:

Comment 3 mkanoor 2015-11-19 19:13:46 UTC
Josh,
From a state field in a state machine you only point to instances not methods. Methods typically just have a name and instances typically have a fully qualified name or a partially qualified name starting at the namespace. In the customers case they have a method called ValidateVMName, sitting in place of an instance name. And that leads to the failure. If they just want to run a method they would have to leave the field value empty and set the name of the method in on_entry.
More over the method that they are attempting to call is empty, it doesn't do anything.
Can you please ask the customer if they want to call the method or call an instance that calls the method.

Typically if you look at any state machine the state is a relationship that points to an instance which points to a method in the same class.

Comment 5 mkanoor 2015-11-25 15:25:53 UTC
Spoke to Josh, he agreed on closing it.