Description of problem: Migration Plan Request gets Denied even if conversion host is configured on my appliance via Rails console Version-Release number of selected component (if applicable): 5.10.0.24 How reproducible: Believe 100% Steps to Reproduce: 1.Add VMware and RHV provider 2.Configure RHV conversion host 3.Create infra mapping and migration plan and execute Actual results: Request gets Denied. [----] E, [2018-11-16T16:40:19.266482 #5601:3f10768] ERROR -- : <AEMethod validate_request> The following error occurred during method evaluation: [----] E, [2018-11-16T16:40:19.267297 #5601:3f10768] ERROR -- : <AEMethod validate_request> NoMethodError: undefined method `message=' for #<MiqAeMethodService::MiqAeServiceServiceTemplateTransformationPlanRequest:0x0000000015732cc8> [----] E, [2018-11-16T16:40:19.268085 #5601:3f10768] ERROR -- : <AEMethod validate_request> (drbunix:///tmp/automation_engine20181116-5601-upj7q1) /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-4a01657f4f6e/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb:234:in `method_missing' (drbunix:///tmp/automation_engine20181116-5601-upj7q1) /usr/share/ruby/drb/drb.rb:1624:in `perform_without_block' (drbunix:///tmp/automation_engine20181116-5601-upj7q1) /usr/share/ruby/drb/drb.rb:1584:in `perform' (drbunix:///tmp/automation_engine20181116-5601-upj7q1) /usr/share/ruby/drb/drb.rb:1668:in `block (2 levels) in main_loop' (drbunix:///tmp/automation_engine20181116-5601-upj7q1) /usr/share/ruby/drb/drb.rb:1664:in `loop' (drbunix:///tmp/automation_engine20181116-5601-upj7q1) /usr/share/ruby/drb/drb.rb:1664:in `block in main_loop' [----] E, [2018-11-16T16:40:19.275183 #5601:3f10768] ERROR -- : Method STDERR: (drbunix:///tmp/automation_engine20181116-5601-upj7q1) /opt/rh/cfme-gemset/bundler/gems/cfme-automation_engine-4a01657f4f6e/lib/miq_automation_engine/engine/miq_ae_method_service/miq_ae_service_model_base.rb:234:in `method_missing': undefined method `message=' for #<MiqAeMethodService::MiqAeServiceServiceTemplateTransformationPlanRequest:0x0000000015732cc8> (NoMethodError) [----] E, [2018-11-16T16:40:19.275772 #5601:3f10768] ERROR -- : Method STDERR: from (drbunix:///tmp/automation_engine20181116-5601-upj7q1) /usr/share/ruby/drb/drb.rb:1624:in `perform_without_block' [----] E, [2018-11-16T16:40:19.276304 #5601:3f10768] ERROR -- : Method STDERR: from (drbunix:///tmp/automation_engine20181116-5601-upj7q1) /usr/share/ruby/drb/drb.rb:1584:in `perform' [----] E, [2018-11-16T16:40:19.276766 #5601:3f10768] ERROR -- : Method STDERR: from (drbunix:///tmp/automation_engine20181116-5601-upj7q1) /usr/share/ruby/drb/drb.rb:1668:in `block (2 levels) in main_loop' [----] E, [2018-11-16T16:40:19.277293 #5601:3f10768] ERROR -- : Method STDERR: from (drbunix:///tmp/automation_engine20181116-5601-upj7q1) /usr/share/ruby/drb/drb.rb:1664:in `loop' [----] E, [2018-11-16T16:40:19.277739 #5601:3f10768] ERROR -- : Method STDERR: from (drbunix:///tmp/automation_engine20181116-5601-upj7q1) /usr/share/ruby/drb/drb.rb:1664:in `block in main_loop' [----] E, [2018-11-16T16:40:19.278088 #5601:3f10768] ERROR -- : Method STDERR: from /ManageIQ/Transformation/StateMachines/TransformationPlanRequestApproval/validate_request:5:in `<main>' [----] I, [2018-11-16T16:40:19.301437 #5601:7f8f78] INFO -- : <AEMethod [/ManageIQ/Transformation/StateMachines/TransformationPlanRequestApproval/validate_request]> Ending [----] E, [2018-11-16T16:40:19.301820 #5601:7f8f78] ERROR -- : State=<ValidateRequest> running on_entry raised exception: <Method exited with rc=Unknown RC: [1]> [----] W, [2018-11-16T16:40:19.301929 #5601:7f8f78] WARN -- : Error in State=[ValidateRequest] Expected results: Request should not be denied Additional info: I can provide appliance that can reproduce this issue.
Can I get access to the appliance ? Please always add this information as it accelerates debugging. Thanks
Hey Fabien, 10.16.5.104 and 10.16.5.105 have 1 migration plan each stuck in slightly different states. Will expire in 7 days.
The conversion host was not correctly setup: 3 records in the DB for only one conversion host. This should not happen in real life because we'll have API to CRUD the conversion hosts. I have removed the extra records. Would you mind recreating the migration plan and try it again ? # vmdb # rails c irb> ServiceTemplateTransformationPlanRequest.all.each { |r| r.destroy } irb> ServiceTemplateTransformationPlan.all.each { |p| p.destroy }
Thanks Fabien. Does it mean I cannot set more than one conversion host? Or there were duplicate records for one conversion host?
All 3 records where pointing to the same instance, so the backend code was confused and fails allocating a host. That's one of the problems when using rails console: no check is done. The API will check that for us.
Kedar, do you still encounter this issue ?
I believe this was due to Rails command being run multiple times, cannot reproduce it if I follow the steps.We will need to revisit this once we move away from rails command usage for conversion appliance config. Closing for now.