Bug 1390146

Summary: vm provisioning using REST API fails with automation engine errors
Product: Red Hat CloudForms Management Engine Reporter: Martin Kourim <mkourim>
Component: AutomateAssignee: Drew Bomhof <dbomhof>
Status: CLOSED WORKSFORME QA Contact: Martin Kourim <mkourim>
Severity: high Docs Contact:
Priority: high    
Version: 5.6.0CC: gmccullo, jhardy, mkanoor, mkourim, obarenbo, tfitzger
Target Milestone: GA   
Target Release: cfme-future   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: automate:rest:provisioning
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-23 22:24:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Martin Kourim 2016-10-31 10:13:45 UTC
Description of problem:
Provisioning of VM using REST API fails with automation engine errors.

Version-Release number of selected component (if applicable):
5.6.2.2


How reproducible:
100%


Steps to Reproduce:

1. provision VM using REST API with request like

POST /api/provision_requests
{
   "action":"create",
   "resource":{
      "version":"1.1",
      "template_fields":{ "guid":"<guid>" },
      "vm_fields":{
         "vm_name":"<name>",
         "number_of_cpus":1,
         "vm_memory":"2048",
         "vlan":"VM Network"
      },
      "requester":{
         "user_name":"admin",
         "owner_first_name":"John",
         "owner_last_name":"Doe",
         "owner_email":"jdoe",
         "auto_approve":true
      },
      "tags":{
         "network_location":"Internal",
         "cc":"001"
      },
      "additional_values":{ "request_id":"1001" },
      "ems_custom_attributes":{ },
      "miq_custom_attributes":{ }
   }
}

2. check provisioning progress:
GET /api/provision_requests/:id

3. check evm.log


Actual results:

Provisioning fails with "[RuntimeError]: A specified parameter was not correct. \nspec.location.folder".

In evm.log:

ERROR -- : Q-task_id([miq_provision_63]) <AutomationEngine> State=<CheckProvisioned> running on_error raised exception: <invalid method calling syntax: [update_provision_status(status => '[RuntimeError]: A specified parameter was not correct.
spec.location.folder')]>

Relevant log snippets on http://pastebin.test.redhat.com/424905

Comment 2 Dave Johnson 2016-11-03 17:50:35 UTC
Martin, can you confirm if this is on 5.7 or not?

Comment 3 Martin Kourim 2016-11-03 18:04:52 UTC
I was not able to reproduce it on 5.7

Comment 4 Greg McCullough 2016-11-04 12:59:28 UTC
Removing blocker flag as this is not a bug on 5.7.

Martin - Please retest for 5.6.3.

Comment 5 Martin Kourim 2016-11-21 19:28:24 UTC
Retested on 5.6.3 and I can no longer reproduce this issue.

Comment 6 Drew Bomhof 2017-01-16 21:44:36 UTC
Martin - would it be ok to close this issue since it seems fixed in 5.6.3 and up?

Comment 7 Martin Kourim 2017-01-19 17:28:02 UTC
Yes, I'm ok with closing this.