Bug 1650699 - [v2v][rhv] Migration Plan Request gets Denied even if conversion host is configured
Summary: [v2v][rhv] Migration Plan Request gets Denied even if conversion host is conf...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: V2V
Version: 5.10.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: 5.10.0
Assignee: Brett Thurber
QA Contact: Kedar Kulkarni
Red Hat CloudForms Documentation
URL:
Whiteboard: v2v
Depends On: 1643938
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-11-16 21:46 UTC by Kedar Kulkarni
Modified: 2018-11-26 15:40 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-26 15:40:13 UTC
Category: ---
Cloudforms Team: V2V
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Kedar Kulkarni 2018-11-16 21:46:21 UTC
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.

Comment 2 Fabien Dupont 2018-11-18 17:02:04 UTC
Can I get access to the appliance ? Please always add this information as it accelerates debugging. Thanks

Comment 3 Kedar Kulkarni 2018-11-19 01:39:45 UTC
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.

Comment 4 Fabien Dupont 2018-11-19 16:04:38 UTC
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 }

Comment 5 Kedar Kulkarni 2018-11-19 18:39:54 UTC
Thanks Fabien. Does it mean I cannot set more than one conversion host? Or there were duplicate records for one conversion host?

Comment 6 Fabien Dupont 2018-11-20 08:03:26 UTC
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.

Comment 7 Fabien Dupont 2018-11-26 13:48:18 UTC
Kedar, do you still encounter this issue ?

Comment 8 Kedar Kulkarni 2018-11-26 15:40:13 UTC
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.


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