Error happened when creating vm using catalog item


#1

hi,all
Much the same as https://pemcg.gitbooks.io/introduction-to-cloudforms-automation/content/chapter17/creating_a_service_item.html , I try to create a vm using a catalog item bundling a dialog. The steps are as below:
(1)setup a dialog:


(2) config a service catalog item

The Request Info is correctly set.

When I order the service, following error happened:

128845:[----] I, [2016-09-11T22:10:00.114270 #5973:68e070] INFO – : Q-task_id([service_template_provision_task_37]) Service ProvisionCheck returned for state and status
128849:[----] I, [2016-09-11T22:10:00.132671 #5973:6b5990] INFO – : Q-task_id([service_template_provision_task_37]) Processed State=[checkprovisioned] with Result=[error]
128850:[----] W, [2016-09-11T22:10:00.132839 #5973:6b5990] WARN – : Q-task_id([service_template_provision_task_37]) Error in State=[checkprovisioned]
128851:[----] I, [2016-09-11T22:10:00.133121 #5973:6b5990] INFO – : Q-task_id([service_template_provision_task_37]) In State=[checkprovisioned], invoking [on_error] method=[update_serviceprovision_status(status => '[NoMethodError]: undefined method []' for nil:NilClass')] 128853:[----] I, [2016-09-11T22:10:00.185796 #5973:6b5990] INFO -- : Q-task_id([service_template_provision_task_37]) Invoking [inline] method [/ManageIQ/Service/Provisioning/StateMachines/ServiceProvision_Template/update_serviceprovision_status] with inputs [{"status"=>"[NoMethodError]: undefined method[]"}]
128881:[----] I, [2016-09-11T22:10:13.484674 #4173:6910e0] INFO – : Q-task_id([miq_provision_38]) ProvisionCheck returned for state and status
128885:[----] I, [2016-09-11T22:10:13.505588 #4173:6b5990] INFO – : Q-task_id([miq_provision_38]) Processed State=[CheckProvisioned] with Result=[error]
128886:[----] W, [2016-09-11T22:10:13.505893 #4173:6b5990] WARN – : Q-task_id([miq_provision_38]) Error in State=[CheckProvisioned]
128887:[----] I, [2016-09-11T22:10:13.506381 #4173:6b5990] INFO – : Q-task_id([miq_provision_38]) In State=[CheckProvisioned], invoking [on_error] method=[update_provision_status(status => '[NoMethodError]: undefined method []' for nil:NilClass')] 128889:[----] I, [2016-09-11T22:10:13.614223 #4173:6b5990] INFO -- : Q-task_id([miq_provision_38]) Invoking [inline] method [/ManageIQ/Cloud/VM/Provisioning/StateMachines/VMProvision_VM/update_provision_status] with inputs [{"status"=>"[NoMethodError]: undefined method[]"}]
128913:[----] I, [2016-09-11T22:10:14.565688 #5973:69193c] INFO – : Q-task_id([service_template_provision_task_36]) Service ProvisionCheck returned for state and status
128917:[----] I, [2016-09-11T22:10:14.586406 #5973:6b5990] INFO – : Q-task_id([service_template_provision_task_36]) Processed State=[checkprovisioned] with Result=[error]
128918:[----] W, [2016-09-11T22:10:14.586660 #5973:6b5990] WARN – : Q-task_id([service_template_provision_task_36]) Error in State=[checkprovisioned]
128919:[----] I, [2016-09-11T22:10:14.587093 #5973:6b5990] INFO – : Q-task_id([service_template_provision_task_36]) In State=[checkprovisioned], invoking [on_error] method=[update_serviceprovision_status(status => '[NoMethodError]: undefined method []' for nil:NilClass')] 128921:[----] I, [2016-09-11T22:10:14.766633 #5973:6b5990] INFO -- : Q-task_id([service_template_provision_task_36]) Invoking [inline] method [/ManageIQ/Service/Provisioning/StateMachines/ServiceProvision_Template/update_serviceprovision_status] with inputs [{"status"=>"[NoMethodError]: undefined method[]"}]

But If I remove the cloud_tenant in the dialog, all things work ok.
Why this happened or How to debug this error? Any help is welcome, thank you!


#2

@gmccullough can you review this question from @wangxiangyu and forward to a SME if necessary.


#3

I have the same issue with darga 4


#4

Updated to darga-4.1, this time error:
[----] I, [2016-10-12T13:19:06.943816 #5216:ac1980] INFO – : Q-task_id([service_template_provision_task_70]) Invoking [inline] method [/ManageIQ/Service/Provisioning/StateMachines/ServiceProvision_Template/update_serviceprovision_status] with inputs [{“status”=>"[NoMethodError]: undefined method `root_disk_size"}]


#5

My bad, error occurs because of wrong “instance_type” field value in service dialog.


#6

@k3nny0ne Can you provide a little more detail on how you fixed the issue for myself and future readers? Thanks.


#7

Hi, I have the same issue when I tried to add “instance_type” argument:

Server [EVM] Service [Instance-20170623-084701] Step [checkprovisioned] Status [[NoMethodError]: undefined method root_disk_size] Message [[NoMethodError]: undefined methodroot_disk_size’ for nil:NilClass]

Can you give me some clarity on this? I had created a dialog with “instance_type” argument and pass a string with the flavor of OSP


#8

Done. I was typing flavor as “A1” and it requires the ID of the flavor stored in the DB of ManageIQ/CloudForms, wich can be found in “flavors” table.

select * from flavors