<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Feb 10, 2014 at 3:11 PM, Sean Dague <span dir="ltr"><<a href="mailto:sean@dague.net" target="_blank">sean@dague.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class="">On 02/10/2014 05:05 PM, Christopher Yeoh wrote:<br>
> On Mon, Feb 10, 2014 at 2:56 PM, Sean Dague <<a href="mailto:sean@dague.net">sean@dague.net</a><br>
</div><div><div class="h5">> <mailto:<a href="mailto:sean@dague.net">sean@dague.net</a>>> wrote:<br>
><br>
>     In upstream Nova master we're currently logging ec2 wsgi requests twice,<br>
>     once in the paste pipeline, and once in eventlet.<br>
><br>
>     The following patch removes the paste pipeline portion -<br>
>     <a href="https://review.openstack.org/#/c/67736/" target="_blank">https://review.openstack.org/#/c/67736/</a><br>
><br>
>     However... I'm not very satisfied with this approach, as the resulting<br>
>     log entries look as follows (lots more examples at -<br>
>     <a href="http://logs.openstack.org/36/67736/7/check/check-tempest-dsvm-full/9b0eb3e/logs/screen-n-api.txt.gz?level=INFO" target="_blank">http://logs.openstack.org/36/67736/7/check/check-tempest-dsvm-full/9b0eb3e/logs/screen-n-api.txt.gz?level=INFO</a>)<br>

><br>
>     ... "POST /services/Cloud/ HTTP/1.1" status: 200 len: 2099 time:<br>
>     0.8823061<br>
>     ... "POST /services/Cloud/ HTTP/1.1" status: 200 len: 449 time:<br>
>     0.1196980<br>
>     ... "POST /services/Cloud/ HTTP/1.1" status: 200 len: 2095 time:<br>
>     0.4743402<br>
>     ... "POST /services/Cloud/ HTTP/1.1" status: 400 len: 360 time:<br>
>     0.5385840<br>
>     ... "POST /services/Cloud/ HTTP/1.1" status: 200 len: 449 time:<br>
>     0.1317410<br>
><br>
>     Because the eventlet logger is only logging the requestline (which is<br>
>     the URL), Post requests are basically completely information free.<br>
><br>
>     We have an equally opaque problem in the Nova API with server actions:<br>
><br>
>     ... "POST<br>
>     /v2/85979842c31049fab70bcdd399cb9a3f/servers/4d5c5ba0-a975-4f4b-863a-390ad58e1c48/action<br>
>     HTTP/1.1" status: 202 len: 185 time: 1.1360781<br>
><br>
>     Because these aren't really RESTful interfaces, so the url is not useful<br>
>     enough to determine the action.<br>
><br>
>     My feeling is that we need to make the wsgi request logs useful enough<br>
>     to know what was actually called on an API call, which means I'm not<br>
>     convinced we can actually use the eventlet logger for Nova, because our<br>
>     URLs aren't actually RESTful.<br>
><br>
>     I'm slightly surprised that in v3 we do the same thing. Could we at<br>
>     minimum change .... action urls to action/ACTIONNAME, or would that<br>
>     completely not work with our router?<br>
><br>
><br>
> Yea this is a wsgi "thing". I guess we'll need to log action POSTs twice<br>
> to get enough useful info in the logs.<br>
<br>
</div></div>No, I get that our urls are POST .../action.  :)<br>
<br>
What I'm saying is that isn't a RESTful url. The API end point should be<br>
POST .../action/BLAH, and that's what attached to the controller. It<br>
seems like given that we haven't yet released the v3 API this is maybe<br>
changable.<br></blockquote><div><br></div><div>Hrm perhaps. Probably require a bit of hacking on wsgi to change how<br>wsgi.action works and then a bunch of unittests and tempest tests updated <br>to allow the patches to merge (unless we allow both types of behaviour in<br>
the meantime. <br><br></div><div>However, for a RESTful url api design aren't you meant to avoid using verbs in the URL?<br></div><div>Which is why I think the design was done this way in the first place. eg<br><br><a href="http://stackoverflow.com/questions/2447722/rest-services-exposing-non-data-actions">http://stackoverflow.com/questions/2447722/rest-services-exposing-non-data-actions</a><br>
</div><div><br></div><div>so I'm not convinced we should be changing this. And feature propsal deadline is<br></div><div>only a week away anyway.<br></div><div><br></div><div>Chris<br></div><div><br></div></div></div>
</div>