Bug 1283738 - Importing automate model causes invalid URI errors.
Importing automate model causes invalid URI errors.
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate (Show other bugs)
All All
unspecified Severity high
: GA
: 5.5.0
Assigned To: mkanoor
Dave Johnson
Depends On:
  Show dependency treegraph
Reported: 2015-11-19 12:12 EST by Josh Carter
Modified: 2016-03-09 15:12 EST (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-11-25 10:25:53 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Josh Carter 2015-11-19 12:12:11 EST
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
[----] 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
-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): 

How reproducible:

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

Actual results:

Expected results:

Additional info:
Comment 3 mkanoor 2015-11-19 14:13:46 EST
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 10:25:53 EST
Spoke to Josh, he agreed on closing it.

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