Bug 1390146 - vm provisioning using REST API fails with automation engine errors
Summary: vm provisioning using REST API fails with automation engine errors
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Automate
Version: 5.6.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: GA
: cfme-future
Assignee: Drew Bomhof
QA Contact: Martin Kourim
URL:
Whiteboard: automate:rest:provisioning
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-31 10:13 UTC by Martin Kourim
Modified: 2017-01-23 22:24 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-23 22:24:42 UTC
Category: ---
Cloudforms Team: ---
Target Upstream Version:


Attachments (Terms of Use)

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.


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