H All,
I am just starting with CloudForms/ManageIQ so apologies in advance if I have missed something obvious here…
I am working on a simple Service Dialog (RHEL template in Ovirt) and after reading #PEMCG - customising_vm_provisioning chapter I though I would give it a try but I am getting only half way through…
I am running gaprindashvili-3 + ovirt4.2.3
I can successfully deploy VM from template on its own (both via life cycle or service dialog without extra changes needed for additional disk) when I tried to follow Peter’s steps I am ending up with:
-
failed service deployment:
Server [EVM] Service [rhel7-miq2-ss10] Step [checkprovisioned] Status [Error Creating Service] Message [Applied PostProvision Customizations] -
VM in ovirt:
in powered off state
2nd vdisk created and activated
And this from automation log:
INFO – : Q-task_id([miq_provision_1000000000061]) Next State=[AddDisk]
INFO – : Q-task_id([miq_provision_1000000000061]) Processing State=[AddDisk]
INFO – : Q-task_id([miq_provision_1000000000061]) Following Relationship [miqaedb:/Testing/TZ_Customization/RedHat/Methods/AddDisk#create]
INFO – : Q-task_id([miq_provision_1000000000061]) Updated namespace [TZ_Customization/RedHat/Methods/add_disk Testing/TZ_Customization/RedHat]
INFO – : Q-task_id([miq_provision_1000000000061]) Invoking [inline] method [/Testing/TZ_Customization/RedHat/Methods/add_disk] with inputs [{}]
INFO – : Q-task_id([miq_provision_1000000000061]) <AEMethod [/Testing/TZ_Customization/RedHat/Methods/add_disk]> Starting
INFO – : Adding 10 GByte disk to VM: rhel7-miq2-ss10
ERROR – : [undefined method[]' for nil:NilClass] /Testing/TZ_Customization/RedHat/Methods/add_disk:112:in
’
INFO – : Q-task_id([miq_provision_1000000000061]) <AEMethod [/Testing/TZ_Customization/RedHat/Methods/add_disk]> Ending
INFO – : Q-task_id([miq_provision_1000000000061]) Stopping instantiation because [Method exited with rc=MIQ_STOP]
INFO – : Q-task_id([miq_provision_1000000000061]) Followed Relationship [miqaedb:/Testing/TZ_Customization/RedHat/Methods/AddDisk#create]
Any ideas?
I have checked the add_disk method around line 112 but I am unsure about it:
110 # Pull out some re-usable href's from the initial response
111 #
112 creation_status_href = doc.at_xpath("/disk_attachment/link")['href']
113 disk_href = doc.at_xpath("/disk_attachment/disk")['href']
114 attachment_href = doc.at_xpath("/disk_attachment")['href']
Regards,
Tomasz