resource group fails validate a template resource type

Bug #1397945 reported by Qiming Teng
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
Fix Released
Critical
Steven Hardy

Bug Description

ResourceGroup validation fails if the resource_def is a template resource. This can be reproduced by running the following command:

python -m testtools.run heat_integrationtests.functional.test_update

Traceback (most recent call last):
  File "heat_integrationtests/functional/test_update.py", line 193, in test_stack_update_provider_group
    environment=env
  File "/opt/stack/python-heatclient/heatclient/v1/stacks.py", line 134, in create
    data=kwargs, headers=headers)
  File "/opt/stack/python-heatclient/heatclient/common/http.py", line 255, in json_request
    resp = self._http_request(url, method, **kwargs)
  File "/opt/stack/python-heatclient/heatclient/common/http.py", line 210, in _http_request
    raise exc.from_response(resp)
HTTPNotFound: ERROR: Not found

The problem is that ResourceGroup cannot perform resource validation properly when given a template as resource type.

Qiming Teng (tengqim)
Changed in heat:
assignee: nobody → Qiming Teng (tengqim)
Revision history for this message
Qiming Teng (tengqim) wrote :

Here is how to reproduce this using command line:

env.yaml

resource_registry:
  My::RandomString : provider.yaml

provider.yaml

heat_template_version: 2013-05-23
resources:
  random:
    type: My::RandomString

resgrp.yaml

heat_template_version: 2013-05-23
resources:
  array:
    type: OS::Heat::ResourceGroup
    properties:
      count: 2
      resource_def:
        type: My::RandomString

command:

heat stack-create -f resgrp.yaml -e env.yaml resgrp

Revision history for this message
Qiming Teng (tengqim) wrote :

the provider.yaml in the previous comment is wrong. It should be:

# cat provider.yaml

heat_template_version: 2013-05-23
resources:
  random:
    type: OS::Heat::RandomString

However, the error cannot be reproduced using these templates. I'm now suspecting that the test case needs a revision.

Changed in heat:
importance: Undecided → Critical
milestone: none → kilo-1
status: New → Triaged
Revision history for this message
Steven Hardy (shardy) wrote :
Changed in heat:
assignee: Qiming Teng (tengqim) → Steven Hardy (shardy)
status: Triaged → Fix Committed
Thierry Carrez (ttx)
Changed in heat:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in heat:
milestone: kilo-1 → 2015.1.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.