There are many call's between httpd and heat-api.

Bug #1695152 reported by Kiran Totad
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
In Progress
Low
Unassigned

Bug Description

When users are trying to get resource details of a specified stack , there are many call's between httpd and heat-api.
For stack Identification ,the following are requested:
1) Identify the stack based on stack id
2) Get the template details
3) Gets the details of specified stack
4) Gets the resource of specified stack
5) Get implementation details with nova api
To list out resource of a stack:
1) Get the stack
2) Gets the templates details
3) Gets the resource details of a specified stack
In each case Two request have been made to get the details
1st: get : HTTP <302> response
2nd: get: HTTP <201> response

As user knows HTTP <302> used for url redirection and <201> is for success, those two request should be merged into one request to get details in one request. By which the number of interaction between httpd and heat-api can be minimize. This will improve the performance of the use case.

Rico Lin (rico-lin)
Changed in heat:
status: New → Confirmed
importance: Undecided → Low
huangsm (huangsm)
Changed in heat:
assignee: nobody → huangsm (huangsm)
Changed in heat:
status: Confirmed → In Progress
Revision history for this message
Zane Bitter (zaneb) wrote :

It is indeed unfortunate that the API requires you to know *both* the name and the UUID of the stack before you can fetch details about it directly.

That said, I am yet to be convinced that this is a major problem. It only takes one API call to figure out the name & UUID if you don't know them both already. In the context of the 5+ you're apparently doing (though I have no idea why) that seems fairly minimal.

> This will improve the performance of the use case.

Do we have any evidence for this?

Revision history for this message
huangsm (huangsm) wrote :

I think , in the same environment, one direct request should be processed faster than that redirect.
I tests like that:

[root@localhost ~ 11:31 26]$ time curl http://192.168.133.104:8004/v1/706f6efb173f4454a89b15fd76abf1c9/stacks/hsm-hot1 -H "User-Agent: python-heatclient" -H "Accept: application/json" -H "X-Auth-Token:6af97cfa0eb34d59b9955335354f8dd4" -L
{"stack": {"disable_rollback": true, "description": "Simple template to deploy a single compute instance", "parent": null, "tags": null, "stack_name": "hsm-hot1", "stack_user_project_id": "0bc52e9bbca64507bf41cfb508f02f1e", "stack_status_reason": "'NoneType' object has no attribute '__getitem__'", "creation_time": "2017-12-15T06:19:13", "links": [{"href": "http://192.168.133.104:8004/v1/706f6efb173f4454a89b15fd76abf1c9/stacks/hsm-hot1/6d1226cc-a63f-4904-9546-7ec191de4fc3", "rel": "self"}], "capabilities": [], "notification_topics": [], "updated_time": "2017-12-15T06:23:49", "timeout_mins": null, "stack_status": "DELETE_FAILED", "stack_owner": null, "parameters": {"OS::project_id": "706f6efb173f4454a89b15fd76abf1c9", "OS::stack_id": "6d1226cc-a63f-4904-9546-7ec191de4fc3", "OS::stack_name": "hsm-hot1"}, "id": "6d1226cc-a63f-4904-9546-7ec191de4fc3", "template_description": "Simple template to deploy a single compute instance"}}
real 0m0.075s
user 0m0.004s
sys 0m0.002s
[root@localhost ~ 11:31 27]$ time curl http://192.168.133.104:8004/v1/706f6efb173f4454a89b15fd76abf1c9/stacks/hsm-hot1/6d1226cc-a63f-4904-9546-7ec191de4fc3 -H "User-Agent: python-heatclient" -H "Accept: application/json" -H "X-Auth-Token:6af97cfa0eb34d59b9955335354f8dd4"
{"stack": {"disable_rollback": true, "description": "Simple template to deploy a single compute instance", "parent": null, "tags": null, "stack_name": "hsm-hot1", "stack_user_project_id": "0bc52e9bbca64507bf41cfb508f02f1e", "stack_status_reason": "'NoneType' object has no attribute '__getitem__'", "creation_time": "2017-12-15T06:19:13", "links": [{"href": "http://192.168.133.104:8004/v1/706f6efb173f4454a89b15fd76abf1c9/stacks/hsm-hot1/6d1226cc-a63f-4904-9546-7ec191de4fc3", "rel": "self"}], "capabilities": [], "notification_topics": [], "updated_time": "2017-12-15T06:23:49", "timeout_mins": null, "stack_status": "DELETE_FAILED", "stack_owner": null, "parameters": {"OS::project_id": "706f6efb173f4454a89b15fd76abf1c9", "OS::stack_id": "6d1226cc-a63f-4904-9546-7ec191de4fc3", "OS::stack_name": "hsm-hot1"}, "id": "6d1226cc-a63f-4904-9546-7ec191de4fc3", "template_description": "Simple template to deploy a single compute instance"}}
real 0m0.045s
user 0m0.002s
sys 0m0.004s

huangsm (huangsm)
Changed in heat:
assignee: huangsm (huangsm) → nobody
Rico Lin (rico-lin)
Changed in heat:
milestone: none → no-priority-tag-bugs
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on heat (master)

Change abandoned by Zane Bitter (<email address hidden>) on branch: master
Review: https://review.opendev.org/527312

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.