Bug 1252849 - Heat stack deployment gets stuck when stack parameter is not found
Heat stack deployment gets stuck when stack parameter is not found
Status: CLOSED ERRATA
Product: Red Hat CloudForms Management Engine
Classification: Red Hat
Component: Provisioning (Show other bugs)
5.4.0
Unspecified Unspecified
high Severity medium
: GA
: 5.5.0
Assigned To: Bill Wei
Marius Cornea
:
Depends On:
Blocks: 1273191
  Show dependency treegraph
 
Reported: 2015-08-12 07:21 EDT by Marius Cornea
Modified: 2015-12-08 08:26 EST (History)
8 users (show)

See Also:
Fixed In Version: 5.5.0.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1273191 (view as bug list)
Environment:
Last Closed: 2015-12-08 08:26:39 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
stack error (24.97 KB, text/plain)
2015-08-12 07:21 EDT, Marius Cornea
no flags Details
Provisioning failed with proper error message (110.30 KB, image/png)
2015-08-17 23:59 EDT, Bill Wei
no flags Details
stack create (12.84 KB, image/png)
2015-08-28 11:54 EDT, Marius Cornea
no flags Details

  None (edit)
Description Marius Cornea 2015-08-12 07:21:40 EDT
Created attachment 1061911 [details]
stack error

Description of problem:
I'm trying to deploy a Heat stack by using the Orchestration Templates. Template can be found in the gist below. If the key parameter doesn't exist on the Openstack cloud the service request gets stuck with Pending state and Creating Stack as last message. The evm.log shows the stack validation error. Attaching error message.

https://gist.githubusercontent.com/mcornea/b9fb556e279b75db9abc/raw/392824501529fb9a5bad9602d86dd10bb20c156d/heat-wordpress

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

How reproducible:
100%

Steps to Reproduce:
Go to Services -> Catalogs -> Orchestration Templates
Click on Configuration -> Create new Orchestration Template
Write name and description for template, select Openstack Heat template type and copy paste template from https://gist.githubusercontent.com/mcornea/b9fb556e279b75db9abc/raw/392824501529fb9a5bad9602d86dd10bb20c156d/heat-wordpress
Cick Add
Go to Services -> Catalogs -> Orchestration Templates
Click on the template you created in previous step
Click on Configuration -> Create Service Dialog from Orchestration Template; Input name
Go to Services -> Catalogs -> Catalog Items
Click on Configuration; Add a New Catalog Item
Choose Orchestration Catalog Type
Input name/descr; select Display in Catalog
Choose Web Blogs Catalog
Choose the service dialog created in previous step
Choose the orchestration template created in previous step
Choose the overcloud Openstack as provider; click Add
Go to Services -> Catalogs -> Service Catalogs
Click on Web Blogs and choose the catalog item created in previous step; Click Order
Input stack name, the other parameters should work fine with defaults; Click Submit
Click on the newly created request; 

Actual results:
Stack doesn't get created and the service request ends up in pending state.

Expected results:
Proper error output would be shown in the UI.
Comment 2 Bill Wei 2015-08-17 23:56:17 EDT
This issue had been resolved in the past as part of https://bugzilla.redhat.com/show_bug.cgi?id=1218436

When I tried to reproduce this issue I was able to see the expected result. See the attachment screenshot.

I am going to close this bug if there is no further question.
Comment 3 Bill Wei 2015-08-17 23:59:07 EDT
Created attachment 1064147 [details]
Provisioning failed with proper error message
Comment 4 Marius Cornea 2015-08-28 11:54:15 EDT
Created attachment 1068069 [details]
stack create

I've checked 5.4.2.0.20150820153254_83e434d and this issue seems to be still present. You can find attached screenshot with service status minutes after the error in /var/www/miq/vmdb/log/evm.log shows up.

You may find the log here:
http://paste.openstack.org/raw/431065/
Comment 6 CFME Bot 2015-08-31 17:45:26 EDT
New commit detected on ManageIQ/manageiq/master:
https://github.com/ManageIQ/manageiq/commit/646e35de9c0456d70de6ccea9b5369cb9aca93f7

commit 646e35de9c0456d70de6ccea9b5369cb9aca93f7
Author:     Bill Wei <bilwei@redhat.com>
AuthorDate: Mon Aug 31 14:50:12 2015 -0400
Commit:     Bill Wei <bilwei@redhat.com>
CommitDate: Mon Aug 31 15:49:19 2015 -0400

    truncate user message to 255 characters which will be saved in a string column
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1252849

 .../StateMachines/Methods.class/__methods__/check_provisioned.rb | 2 +-
 .../StateMachines/Methods.class/__methods__/provision.rb         | 2 +-
 .../method_validation/orchestration_check_provisioned_spec.rb    | 9 +++++++++
 .../unit/method_validation/orchestration_provision_spec.rb       | 9 +++++++++
 4 files changed, 20 insertions(+), 2 deletions(-)
Comment 8 CFME Bot 2015-09-08 18:02:15 EDT
Detected commit referencing this ticket while ticket status is POST.
Comment 10 CFME Bot 2015-09-08 18:03:49 EDT
Detected commit referencing this ticket while ticket status is POST.
Comment 12 CFME Bot 2015-09-08 18:04:45 EDT
Detected commit referencing this ticket while ticket status is POST.
Comment 13 CFME Bot 2015-10-21 12:11:00 EDT
New commit detected on cfme/5.4.z:
https://code.engineering.redhat.com/gerrit/gitweb?p=cfme.git;a=commitdiff;h=b3c56136df791f4a59a8335bae351cac93492845

commit b3c56136df791f4a59a8335bae351cac93492845
Author:     Bill Wei <bilwei@redhat.com>
AuthorDate: Mon Aug 31 14:50:12 2015 -0400
Commit:     Bill Wei <bilwei@redhat.com>
CommitDate: Tue Oct 20 21:09:16 2015 -0400

    Truncate user message to 255 characters which will be saved in a string column
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1252849

 .../Methods.class/__methods__/check_provisioned.rb |  2 +-
 .../Methods.class/__methods__/provision.rb         |  2 +-
 .../orchestration_check_provisioned_spec.rb        | 58 ++++++++++++++++++++++
 .../orchestration_provision_spec.rb                | 29 +++++++++++
 4 files changed, 89 insertions(+), 2 deletions(-)
 create mode 100644 vmdb/spec/automation/unit/method_validation/orchestration_check_provisioned_spec.rb
 create mode 100644 vmdb/spec/automation/unit/method_validation/orchestration_provision_spec.rb
Comment 14 Greg McCullough 2015-10-22 10:26:28 EDT
Clearing needinfo flag which looks to have been set by the bot.
Comment 15 Marius Cornea 2015-11-20 13:07:36 EST
I verified this in 5.5.0.11. 

The last message in the UI shows:
Expected(201) <=> Actual(400 Bad Request) excon.error.response :body => "{\"explanation\": \"The server could not comply with the request since it is either malformed or otherwise incorrect.\", \"code\": 400, \"error\": {\"message\": \"Prope...

This makes it difficult to figure out what went wrong. I expect to get a clear message in the UI, for example, as heat client shows it:
ERROR: Property error: : resources.floating_ip.properties.floating_network: : Error validating value u'public-net': Unable to find network with name 'public-net'  

The message in evm.log shows:
<Expected(201) <=> Actual(400 Bad Request)
excon.error.response
  :body          => "{\"explanation\": \"The server could not comply with the request since it is either malformed or otherwise incorrect.\", \"code\": 400, \"error\": {\"message\": \"Property error: : resources.floating_ip.properties.floating_network: : Error validating value u'public-net': Unable to find network with name 'public-net'\", \"traceback\": \"Traceback (most recent call last):\\n\\n  File \\\"/usr/lib/python2.7/site-packages/heat/common/context.py\\\", line 300, in wrapped\\n    return func(self, ctx, *args, **kwargs)\\n\\n  File \\\"/usr/lib/python2.7/site-packages/heat/engine/service.py\\\", line 670, in create_stack\\n    parent_resource_name)\\n\\n  File \\\"/usr/lib/python2.7/site-packages/heat/engine/service.py\\\", line 578, in _parse_template_and_validate_stack\\n    stack.validate()\\n\\n  File \\\"/usr/lib/python2.7/site-packages/osprofiler/profiler.py\\\", line 105, in wrapper\\n    return f(*args, **kwargs)\\n\\n  File \\\"/usr/lib/python2.7/site-packages/heat/engine/stack.py\\\", line 596, in validate\\n    raise ex\\n\\nStackValidationFailed: Property error: resources.floating_ip.properties.floating_network: Error validating value u'public-net': Unable to find network with name 'public-net'\\n\", \"type\": \"StackValidationFailed\"}, \"title\": \"Bad Request\"}"
Comment 16 Bill Wei 2015-11-20 13:54:09 EST
Marius,
The status hanging issue has been resolved. Please open another enhancement BZ to improve the readability of the error message. Thanks!
Comment 17 Marius Cornea 2015-11-20 13:57:15 EST
Ack. Thanks, Bill.
Comment 19 errata-xmlrpc 2015-12-08 08:26:39 EST
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2015:2551

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