[openstack-dev] [Heat] Unique vs. non-unique stack names

Steven Hardy shardy at redhat.com
Wed Jul 31 11:58:27 UTC 2013

On Tue, Jul 30, 2013 at 02:34:31PM -0500, Jason Dunsmore wrote:
> Hello Heat devs,
> I've started doing some testing to find multi-engine bugs, and I
> discovered that it's possible to create two stacks with the same name
> when only a single heat-engine is running.
> Here are the results of my tests:
> http://dunsmor.com/heat/multi-engine.html#sec-1-1
> Before I create a bug report about this, is it even necessary to enforce
> unique stack names within a tenant?  Why don't we just key off of the
> stack ID when possible and throw an error when it's not possible to look
> up the stack by name?  This is how novaclient does it.
> $ nova image-show F17_test
> ERROR: Multiple image matches found for 'F17_test', use an ID to be more
> specific.

This sounds like a reasonable solution, and would work around the race
you've discovered.  We should be referring to stacks by ID internally
anyway, but we'll need to check that and do some testing, and I guess we'll
need to add a new error path to the API lookup/redirect logic.

Note there's a second bug highlighted in your tests - when you attempt an
update when in CREATE_IN_PROGRESS state, we should probably just reject the
request with an error, not attempt the update and end up in UPDATE_FAILED

If you can raise bugs for both issues, linking to your test results, that
would be great :)


More information about the OpenStack-dev mailing list