find_stack api treat stack_name and id differently

Bug #1529001 reported by Ethan Lynn
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Heat
New
Undecided
Neetu Jain

Bug Description

http://developer.openstack.org/api-ref-orchestration-v1.html#stack_find

If I have a deleted stack, which name is stack_deleted.

I will get a 404 error if I request to v1/stacks/stack_deleted, but I can get the stack if I request to v1/stacks/<id>.
That block the function of openstacksdk, because it always request with id. And it can receive an 404 error if the stack are deleted. If any tool that use this url , they might face the same issue.

➜ unicode git:(master) ✗ heat stack-show n1-OpDX1a3P
Stack not found: n1-OpDX1a3P

➜ unicode git:(master) ✗ heat stack-show 35d2103b-d831-449e-b380-5d5cc313c249
+-----------------------+------------------------------------------------------------------------------------------------------------------------------+
| Property | Value |
+-----------------------+------------------------------------------------------------------------------------------------------------------------------+
| capabilities | [] |
| creation_time | 2015-12-23T16:47:04 |
| description | No description |
| disable_rollback | True |
| id | 35d2103b-d831-449e-b380-5d5cc313c249 |
| links | http://9.123.137.235:8004/v1/1e6a5c5d14f64768991f691616d3ac67/stacks/n1-OpDX1a3P/35d2103b-d831-449e-b380-5d5cc313c249 (self) |
| notification_topics | [] |
| parameters | { |
| | "OS::stack_id": "35d2103b-d831-449e-b380-5d5cc313c249", |
| | "OS::project_id": "1e6a5c5d14f64768991f691616d3ac67", |
| | "OS::stack_name": "n1-OpDX1a3P", |
| | "file": "{u'get_file': u'file:///opt/stack/senlin/examples/profiles/test_script.sh'}" |
| | } |
| parent | None |
| stack_name | n1-OpDX1a3P |
| stack_owner | None |
| stack_status | DELETE_COMPLETE |
| stack_status_reason | Stack DELETE completed successfully |
| stack_user_project_id | be1a9ce11b1849799677dc9c649786cc |
| tags | None |
| template_description | No description |
| timeout_mins | 60 |
| updated_time | None |
+-----------------------+------------------------------------------------------------------------------------------------------------------------------+

Revision history for this message
Neetu Jain (nutshi) wrote :

I confirm this bug

Changed in heat:
assignee: nobody → Neetu Jain (nutshi)
Revision history for this message
Neetu Jain (nutshi) wrote :

| stack_status | DELETE_COMPLETE

so I am assuming the stack-show with stack-name should also give the same result as with ID

Rico Lin (rico-lin)
Changed in heat:
milestone: none → no-priority-tag-bugs
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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