<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";
        mso-fareast-language:EN-IN;}
span.EmailStyle19
        {mso-style-type:personal;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.typ
        {mso-style-name:typ;}
span.pln
        {mso-style-name:pln;}
span.str
        {mso-style-name:str;}
span.kwd
        {mso-style-name:kwd;}
span.pun
        {mso-style-name:pun;}
span.EmailStyle25
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="ZH-CN" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;color:#1F497D;mso-fareast-language:ZH-CN">Thanks Kebane, I test glance/neutron/keystone with ``x-openstack-request-id`` and find something interesting.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;color:#1F497D;mso-fareast-language:ZH-CN"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;color:#1F497D;mso-fareast-language:ZH-CN">I am able to pass ``x-openstack-request-id``  to glance and it will use the UUID as its request-id. But it failed with neutron and keystone.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;color:#1F497D;mso-fareast-language:ZH-CN">Here is my test:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;color:#1F497D;mso-fareast-language:ZH-CN"><a href="http://paste.openstack.org/show/484644/">http://paste.openstack.org/show/484644/</a><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;color:#1F497D;mso-fareast-language:ZH-CN"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;color:#1F497D;mso-fareast-language:ZH-CN">It looks like because keystone and neutron are using oslo_middleware:RequestId.factory and in this part:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><a href="https://github.com/openstack/oslo.middleware/blob/master/oslo_middleware/request_id.py#L35"><span style="color:#1F497D;mso-fareast-language:ZH-CN;text-decoration:none">https://github.com/openstack/oslo.middleware/blob/master/oslo_middleware/request_id.py#L35</span></a></span><span lang="EN-US" style="font-size:10.5pt;color:#1F497D;mso-fareast-language:ZH-CN"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;color:#1F497D;mso-fareast-language:ZH-CN">It will always generate an UUID and append to response as ``x-openstack-request-id`` header.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;color:#1F497D;mso-fareast-language:ZH-CN"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;color:#1F497D;mso-fareast-language:ZH-CN">My question is should we accept an external passed request-id as the project’s own request-id or having its unique request-id?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;color:#1F497D;mso-fareast-language:ZH-CN">In other words, which one is correct way, glance or neutron/keystone? There must be something wrong with one of them.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;color:#1F497D;mso-fareast-language:ZH-CN"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;color:#1F497D;mso-fareast-language:ZH-CN">Thanks<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;color:#1F497D;mso-fareast-language:ZH-CN"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;color:#1F497D;mso-fareast-language:ZH-CN">B.R<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;color:#1F497D;mso-fareast-language:ZH-CN"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;color:#1F497D;mso-fareast-language:ZH-CN">Tan<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10.5pt;color:#1F497D;mso-fareast-language:ZH-CN"><o:p> </o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span lang="EN-US" style="font-size:10.5pt;color:#1F497D;mso-fareast-language:ZH-CN"><o:p> </o:p></span></a></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><a name="_____replyseparator"></a><b><span lang="EN-US" style="mso-fareast-language:ZH-CN">From:</span></b><span lang="EN-US" style="mso-fareast-language:ZH-CN"> Kekane, Abhishek [mailto:Abhishek.Kekane@nttdata.com]
<br>
<b>Sent:</b> Wednesday, December 2, 2015 2:24 PM<br>
<b>To:</b> OpenStack Development Mailing List (openstack-dev@lists.openstack.org)<br>
<b>Subject:</b> Re: [openstack-dev] [nova][glance][cinder][neutron]How to make use of x-openstack-request-id<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<div style="border:none;border-bottom:solid windowtext 1.0pt;padding:0cm 0cm 1.0pt 0cm">
<pre><span lang="EN-IN">Hi Tan,<o:p></o:p></span></pre>
<pre><span lang="EN-IN"><o:p> </o:p></span></pre>
<pre><span lang="EN-IN">Most of the OpenStack RESTful API returns `X-Openstack-Request-Id` in the API <span class="pln">response header but </span><span class="kwd">this</span><span class="pln"> request id </span><span class="kwd">is</span><span class="pln"> </span><span class="kwd">not</span><span class="pln"> available to the </span><span class="kwd">caller</span><span class="pln"> </span><span class="kwd">from</span><span class="pln"> the python client</span><span class="pun">.</span></span><span class="pun"><span lang="EN-US"><o:p></o:p></span></span></pre>
<pre><span class="pun"><span lang="EN-IN">When you use -–debug option from command from the command prompt using client, you can see </span></span><span class="str"><span lang="EN-IN">`X-Openstack-Request-Id`</span></span><span class="pln"><span lang="EN-IN"> on the console but it is not logged anywhere.</span><span lang="EN-US"><o:p></o:p></span></span></pre>
<pre><span class="pln"><span lang="EN-IN"><o:p> </o:p></span></span></pre>
<pre><span class="pln"><span lang="EN-IN">Currently a cross-project specs [1] is submitted and approved for returning </span></span><span class="str"><span lang="EN-IN">X-Openstack-Request-Id to the caller and the implementation for the same is in progress.</span><span lang="EN-US"><o:p></o:p></span></span></pre>
<pre><span class="str"><span lang="EN-IN">Please go through the specs for detail information which will help you to understand more about request-ids and current work about the same.<o:p></o:p></span></span></pre>
<pre><span class="str"><span lang="EN-IN"><o:p> </o:p></span></span></pre>
<pre><span class="str"><span lang="EN-IN">Please feel free to revert back anytime for your doubts.<o:p></o:p></span></span></pre>
<pre><span class="str"><span lang="EN-IN"><o:p> </o:p></span></span></pre>
<pre><span class="str"><span lang="EN-IN">[1] <a href="https://github.com/openstack/openstack-specs/blob/master/specs/return-request-id.rst">https://github.com/openstack/openstack-specs/blob/master/specs/return-request-id.rst</a><o:p></o:p></span></span></pre>
<pre><span class="str"><span lang="EN-IN"><o:p> </o:p></span></span></pre>
<pre><span class="str"><span lang="EN-IN">Thanks,<o:p></o:p></span></span></pre>
<pre><span class="str"><span lang="EN-IN"><o:p> </o:p></span></span></pre>
<pre><span class="str"><span lang="EN-IN">Abhishek Kekane<o:p></o:p></span></span></pre>
<pre><span class="str"><span lang="EN-IN"><o:p> </o:p></span></span></pre>
<pre><span class="str"><span lang="EN-IN"><o:p> </o:p></span></span></pre>
<pre><span lang="EN-US"><o:p> </o:p></span></pre>
</div>
<pre><span lang="EN-IN"><o:p> </o:p></span></pre>
<pre><span lang="EN-IN">Hi guys<o:p></o:p></span></pre>
<pre><span lang="EN-IN">        I recently play around with 'x-openstack-request-id' header but have a dump question about how it works. At beginning, I thought an action across different services should use a same request-id but it looks like this is not the true. <o:p></o:p></span></pre>
<pre><span lang="EN-IN"><o:p> </o:p></span></pre>
<pre><span lang="EN-IN">First I read the spec: <a href="https://blueprints.launchpad.net/nova/+spec/cross-service-request-id">https://blueprints.launchpad.net/nova/+spec/cross-service-request-id</a> which said "This ID and the request ID of the other service will be logged at service boundaries". and I see cinder/neutron/glance will attach its context's request-id as the value of "x-openstack-request-id" header to its response while nova use X-Compute-Request-Id. This is easy to understand. So It looks like each service should generate its own request-id and attach to its response, that's all.<o:p></o:p></span></pre>
<pre><span lang="EN-IN"><o:p> </o:p></span></pre>
<pre><span lang="EN-IN">But then I see glance read 'X-Openstack-Request-ID' to generate the request-id while cinder/neutron/nova read 'openstack.request_id' when using with keystone. It is try to reuse the request-id from keystone.<o:p></o:p></span></pre>
<pre><span lang="EN-IN"><o:p> </o:p></span></pre>
<pre><span lang="EN-IN">This totally confused me. It would be great if you can correct me or point me some reference. Thanks a lot<o:p></o:p></span></pre>
<pre><span lang="EN-IN"><o:p> </o:p></span></pre>
<pre><span lang="EN-IN">Best Regards,<o:p></o:p></span></pre>
<pre><span lang="EN-IN"><o:p> </o:p></span></pre>
<pre><span lang="EN-IN">Tan<o:p></o:p></span></pre>
<p class="MsoNormal"><span lang="EN-IN"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-IN" style="font-size:12.0pt;font-family:"Times New Roman",serif;mso-fareast-language:ZH-CN"><br>
______________________________________________________________________<br>
Disclaimer: This email and any attachments are sent in strictest confidence<br>
for the sole use of the addressee and may contain legally privileged,<br>
confidential, and proprietary data. If you are not the intended recipient,<br>
please advise the sender by replying promptly to this email and then delete<br>
and destroy this email and any attachments without any further use, copying<br>
or forwarding.<o:p></o:p></span></p>
</div>
</body>
</html>