<html><body><div style="color:#000; background-color:#fff; font-family:bookman old style, new york, times, serif;font-size:12pt"><div><span></span></div><pre style="font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; margin-top: 0px; margin-bottom: 0px; color: rgb(51, 51, 51); line-height: 18px;"><div class="line" id="LC778" style="padding-left: 10px;"><b>But, Sir, At which line of code in the func </b></div><div class="line" id="LC778" style="padding-left: 10px;"><font color="#0000FF" face="Monospace" style="line-height: normal; white-space: normal;"><i>def</i></font><font face="Monospace" style="color: rgb(0, 0, 0); line-height: normal; white-space: normal;"><i> </i></font><font face="Monospace" style="color: rgb(0, 0, 0); line-height: normal; white-space: normal;"><i>_make_request</i></font><font face="Monospace" style="color: rgb(0, 0, 0); line-height: normal; white-space: normal;"><i>(</i></font><font
 face="Monospace" style="color: rgb(0, 0, 0); line-height: normal; white-space: normal;"><i>self</i></font><font face="Monospace" style="color: rgb(0, 0, 0); line-height: normal; white-space: normal;"><i>, nodes, part, method, path, headers, query,</i></font></div><font size="2" face="Monospace" style="color: rgb(0, 0, 0); line-height: normal; white-space: normal;"><i>                      logger_thread_locals): </i></font></pre><pre style="font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; margin-top: 0px; margin-bottom: 0px; color: rgb(51, 51, 51); line-height: 18px;"><font size="2" face="Monospace" style="color: rgb(0, 0, 0); line-height: normal; white-space: normal;"><i>flow of control move to the AccoountController class defined in swift/account/server.py (for example)</i></font></pre><pre style="font-family: Consolas, 'Liberation Mono', Courier, monospace;
 font-size: 12px; margin-top: 0px; margin-bottom: 0px; color: rgb(51, 51, 51); line-height: 18px;"><font size="2" face="Monospace" style="color: rgb(0, 0, 0); line-height: normal; white-space: normal;"><i><br></i></font></pre><pre style="font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; margin-top: 0px; margin-bottom: 0px; color: rgb(51, 51, 51); line-height: 18px;"><font size="2" face="Monospace" style="color: rgb(0, 0, 0); line-height: normal; white-space: normal;"><i><pre style="font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; margin-top: 0px; margin-bottom: 0px; color: rgb(51, 51, 51); font-style: normal; line-height: 18px;"><div class="line" id="LC778" style="padding-left: 10px;"><span class="k" style="font-weight: bold;">def</span> <span class="nf" style="color: rgb(153, 0, 0); font-weight: bold;">_make_request</span><span class="p">(</span><span class="bp" style="color: rgb(153, 153,
 153);">self</span><span class="p">,</span> <span class="n">nodes</span><span class="p">,</span> <span class="n">part</span><span class="p">,</span> <span class="n">method</span><span class="p">,</span> <span class="n">path</span><span class="p">,</span> <span class="n">headers</span><span class="p">,</span> <span class="n">query</span><span class="p">,</span></div><div class="line" id="LC779" style="padding-left: 10px;">                      <span class="n">logger_thread_locals</span><span class="p">):</span></div><div class="line" id="LC780" style="padding-left: 10px;">        <span class="sd" style="color: rgb(221, 17, 68);">"""</span></div><div class="line" id="LC781" style="padding-left: 10px;"><span class="sd" style="color: rgb(221, 17, 68);">        Sends an HTTP request to a single node and
 aggregates the result.</span></div><div class="line" id="LC782" style="padding-left: 10px;"><span class="sd" style="color: rgb(221, 17, 68);">        It attempts the primary node, then iterates over the handoff nodes</span></div><div class="line" id="LC783" style="padding-left: 10px;"><span class="sd" style="color: rgb(221, 17, 68);">        as needed.</span></div><div class="line" id="LC784" style="padding-left: 10px;"><br></div><div class="line" id="LC785" style="padding-left: 10px;"><span class="sd" style="color: rgb(221, 17, 68);">        :param nodes: an iterator of the backend server and handoff servers</span></div><div class="line" id="LC786" style="padding-left: 10px;"><span class="sd" style="color: rgb(221, 17, 68);">        :param part: the partition number</span></div><div class="line" id="LC787" style="padding-left: 10px;"><span class="sd" style="color: rgb(221, 17, 68);">        :param method: the method to send to the
 backend</span></div><div class="line" id="LC788" style="padding-left: 10px;"><span class="sd" style="color: rgb(221, 17, 68);">        :param path: the path to send to the backend</span></div><div class="line" id="LC789" style="padding-left: 10px;"><span class="sd" style="color: rgb(221, 17, 68);">        :param headers: a list of dicts, where each dict represents one</span></div><div class="line" id="LC790" style="padding-left: 10px;"><span class="sd" style="color: rgb(221, 17, 68);">                        backend request that should be made.</span></div><div class="line" id="LC791" style="padding-left: 10px;"><span class="sd" style="color: rgb(221, 17, 68);">        :param query: query string to send to the backend.</span></div><div class="line" id="LC792" style="padding-left: 10px;"><span class="sd" style="color: rgb(221, 17, 68);">        :param logger_thread_locals: The thread local values to be set on the</span></div><div class="line" id="LC793"
 style="padding-left: 10px;"><span class="sd" style="color: rgb(221, 17, 68);">                                     self.app.logger to retain transaction</span></div><div class="line" id="LC794" style="padding-left: 10px;"><span class="sd" style="color: rgb(221, 17, 68);">                                     logging information.</span></div><div class="line" id="LC795" style="padding-left: 10px;"><span class="sd" style="color: rgb(221, 17, 68);">        :returns: a swob.Response object</span></div><div class="line" id="LC796" style="padding-left: 10px;"><span class="sd" style="color: rgb(221, 17, 68);">        """</span></div><div class="line" id="LC797" style="padding-left: 10px;">        <span class="bp" style="color: rgb(153, 153, 153);">self</span><span class="o" style="font-weight: bold;">.</span><span class="n">app</span><span class="o" style="font-weight: bold;">.</span><span class="n">logger</span><span
 class="o" style="font-weight: bold;">.</span><span class="n">thread_locals</span> <span class="o" style="font-weight: bold;">=</span> <span class="n">logger_thread_locals</span></div><div class="line" id="LC798" style="padding-left: 10px;">        <span class="k" style="font-weight: bold;">for</span> <span class="n">node</span> <span class="ow" style="font-weight: bold;">in</span> <span class="n">nodes</span><span class="p">:</span></div><div class="line" id="LC799" style="padding-left: 10px;">            <span class="k" style="font-weight: bold;">try</span><span class="p">:</span></div><div class="line" id="LC800" style="padding-left: 10px;">                <span class="n">start_node_timing</span> <span class="o" style="font-weight: bold;">=</span> <span
 class="n">time</span><span class="o" style="font-weight: bold;">.</span><span class="n">time</span><span class="p">()</span></div><div class="line" id="LC801" style="padding-left: 10px;">                <span class="k" style="font-weight: bold;">with</span> <span class="n">ConnectionTimeout</span><span class="p">(</span><span class="bp" style="color: rgb(153, 153, 153);">self</span><span class="o" style="font-weight: bold;">.</span><span class="n">app</span><span class="o" style="font-weight: bold;">.</span><span class="n">conn_timeout</span><span class="p">):</span></div><div class="line" id="LC802" style="padding-left: 10px;">                    <span class="n">conn</span> <span class="o" style="font-weight: bold;">=</span> <span class="n">http_connect</span><span
 class="p">(</span><span class="n">node</span><span class="p">[</span><span class="s" style="color: rgb(221, 17, 68);">'ip'</span><span class="p">],</span> <span class="n">node</span><span class="p">[</span><span class="s" style="color: rgb(221, 17, 68);">'port'</span><span class="p">],</span></div><div class="line" id="LC803" style="padding-left: 10px;">                                        <span class="n">node</span><span class="p">[</span><span class="s" style="color: rgb(221, 17, 68);">'device'</span><span class="p">],</span> <span class="n">part</span><span class="p">,</span> <span class="n">method</span><span class="p">,</span> <span class="n">path</span><span class="p">,</span></div><div class="line" id="LC804" style="padding-left:
 10px;">                                        <span class="n">headers</span><span class="o" style="font-weight: bold;">=</span><span class="n">headers</span><span class="p">,</span> <span class="n">query_string</span><span class="o" style="font-weight: bold;">=</span><span class="n">query</span><span class="p">)</span></div><div class="line" id="LC805" style="padding-left: 10px;">                    <span class="n">conn</span><span class="o" style="font-weight: bold;">.</span><span class="n">node</span> <span class="o" style="font-weight: bold;">=</span> <span class="n">node</span></div><div class="line" id="LC806" style="padding-left:
 10px;">                <span class="bp" style="color: rgb(153, 153, 153);">self</span><span class="o" style="font-weight: bold;">.</span><span class="n">app</span><span class="o" style="font-weight: bold;">.</span><span class="n">set_node_timing</span><span class="p">(</span><span class="n">node</span><span class="p">,</span> <span class="n">time</span><span class="o" style="font-weight: bold;">.</span><span class="n">time</span><span class="p">()</span> <span class="o" style="font-weight: bold;">-</span> <span class="n">start_node_timing</span><span class="p">)</span></div><div class="line" id="LC807" style="padding-left: 10px;">                <span class="k" style="font-weight: bold;">with</span> <span class="n">Timeout</span><span class="p">(</span><span class="bp" style="color: rgb(153, 153,
 153);">self</span><span class="o" style="font-weight: bold;">.</span><span class="n">app</span><span class="o" style="font-weight: bold;">.</span><span class="n">node_timeout</span><span class="p">):</span></div><div class="line" id="LC808" style="padding-left: 10px;">                    <span class="n">resp</span> <span class="o" style="font-weight: bold;">=</span> <span class="n">conn</span><span class="o" style="font-weight: bold;">.</span><span class="n">getresponse</span><span class="p">()</span></div><div class="line" id="LC809" style="padding-left: 10px;">                    <span class="k" style="font-weight: bold;">if</span> <span class="ow" style="font-weight: bold;">not</span> <span class="n">is_informational</span><span class="p">(</span><span
 class="n">resp</span><span class="o" style="font-weight: bold;">.</span><span class="n">status</span><span class="p">)</span> <span class="ow" style="font-weight: bold;">and</span> \</div><div class="line" id="LC810" style="padding-left: 10px;">                            <span class="ow" style="font-weight: bold;">not</span> <span class="n">is_server_error</span><span class="p">(</span><span class="n">resp</span><span class="o" style="font-weight: bold;">.</span><span class="n">status</span><span class="p">):</span></div><div class="line" id="LC811" style="padding-left: 10px;">                        <span class="k" style="font-weight: bold;">return</span> <span class="n">resp</span><span
 class="o" style="font-weight: bold;">.</span><span class="n">status</span><span class="p">,</span> <span class="n">resp</span><span class="o" style="font-weight: bold;">.</span><span class="n">reason</span><span class="p">,</span> <span class="n">resp</span><span class="o" style="font-weight: bold;">.</span><span class="n">getheaders</span><span class="p">(),</span> \</div><div class="line" id="LC812" style="padding-left: 10px;">                            <span class="n">resp</span><span class="o" style="font-weight: bold;">.</span><span class="n">read</span><span class="p">()</span></div><div class="line" id="LC813" style="padding-left: 10px;">                    <span class="k" style="font-weight:
 bold;">elif</span> <span class="n">resp</span><span class="o" style="font-weight: bold;">.</span><span class="n">status</span> <span class="o" style="font-weight: bold;">==</span> <span class="n">HTTP_INSUFFICIENT_STORAGE</span><span class="p">:</span></div><div class="line" id="LC814" style="padding-left: 10px;">                        <span class="bp" style="color: rgb(153, 153, 153);">self</span><span class="o" style="font-weight: bold;">.</span><span class="n">error_limit</span><span class="p">(</span><span class="n">node</span><span class="p">,</span> <span class="n">_</span><span class="p">(</span><span class="s" style="color: rgb(221, 17, 68);">'ERROR Insufficient Storage'</span><span class="p">))</span></div><div class="line" id="LC815" style="padding-left:
 10px;">            <span class="k" style="font-weight: bold;">except</span> <span class="p">(</span><span class="ne" style="color: rgb(153, 0, 0); font-weight: bold;">Exception</span><span class="p">,</span> <span class="n">Timeout</span><span class="p">):</span></div><div class="line" id="LC816" style="padding-left: 10px;">                <span class="bp" style="color: rgb(153, 153, 153);">self</span><span class="o" style="font-weight: bold;">.</span><span class="n">exception_occurred</span><span class="p">(</span><span class="n">node</span><span class="p">,</span> <span class="bp" style="color: rgb(153, 153, 153);">self</span><span class="o" style="font-weight: bold;">.</span><span class="n">server_type</span><span class="p">,</span></div><div class="line" id="LC817" style="padding-left:
 10px;">                                        <span class="n">_</span><span class="p">(</span><span class="s" style="color: rgb(221, 17, 68);">'Trying to </span><span class="si" style="color: rgb(221, 17, 68);">%(method)s</span><span class="s" style="color: rgb(221, 17, 68);"> </span><span class="si" style="color: rgb(221, 17, 68);">%(path)s</span><span class="s" style="color: rgb(221, 17, 68);">'</span><span class="p">)</span> <span class="o" style="font-weight: bold;">%</span></div><div class="line" id="LC818" style="padding-left:
 10px;">                                        <span class="p">{</span><span class="s" style="color: rgb(221, 17, 68);">'method'</span><span class="p">:</span> <span class="n">method</span><span class="p">,</span> <span class="s" style="color: rgb(221, 17, 68);">'path'</span><span class="p">:</span> <span class="n">path</span><span class="p">})</span></div></pre></i></font></pre><pre style="font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; margin-top: 0px; margin-bottom: 0px; color: rgb(51, 51, 51); line-height: 18px;"><font size="2" face="Monospace" style="color: rgb(0, 0, 0); line-height: normal; white-space: normal;"><i><br></i></font></pre><pre style="font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size:
 12px; margin-top: 0px; margin-bottom: 0px; color: rgb(51, 51, 51); line-height: 18px;"><font size="2" face="Monospace" style="color: rgb(0, 0, 0); line-height: normal; white-space: normal;"><i>---</i></font></pre><pre style="font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; margin-top: 0px; margin-bottom: 0px; color: rgb(51, 51, 51); line-height: 18px;"><font size="2" face="Monospace" style="color: rgb(0, 0, 0); line-height: normal; white-space: normal;"><i><br></i></font></pre><pre style="font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; margin-top: 0px; margin-bottom: 0px; color: rgb(51, 51, 51); line-height: 18px;"><font size="2" face="Monospace" style="color: rgb(0, 0, 0); line-height: normal; white-space: normal;"><i>Thank you very much </i></font></pre><pre style="font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; margin-top: 0px; margin-bottom: 0px; color:
 rgb(51, 51, 51); line-height: 18px;"><font size="2" face="Monospace" style="color: rgb(0, 0, 0); line-height: normal; white-space: normal;"><i><br></i></font></pre><pre style="font-family: Consolas, 'Liberation Mono', Courier, monospace; font-size: 12px; margin-top: 0px; margin-bottom: 0px; color: rgb(51, 51, 51); line-height: 18px;"><font size="2" face="Monospace" style="color: rgb(0, 0, 0); line-height: normal; white-space: normal;"><i>Pragya Jain</i></font></pre><div><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;">  <div style="font-family: 'bookman old style', 'new york', times, serif; font-size: 12pt;"> <div style="font-family: 'times new roman', 'new york', times, serif; font-size: 12pt;"> <div dir="ltr"> <hr size="1">  <font size="2" face="Arial"> <b><span style="font-weight:bold;">From:</span></b> Hua ZZ Zhang <zhuadl@cn.ibm.com><br> <b><span style="font-weight:
 bold;">To:</span></b> pragya jain <prag_2648@yahoo.co.in> <br><b><span style="font-weight: bold;">Cc:</span></b> "openstack@lists.openstack.org" <openstack@lists.openstack.org> <br> <b><span style="font-weight: bold;">Sent:</span></b> Friday, 27 September 2013 1:12 PM<br> <b><span style="font-weight: bold;">Subject:</span></b> Re: [Openstack] Fw: problem in understanding interaction between swift      proxy and other servers through swift source code<br> </font> </div> <div class="y_msg_container"><br><div id="yiv2691532929"><div>
<div><font size="2" face="serif"><b>in swift/proxy/controllers/base.py</b></font><br>
<br>
<font size="2" face="serif"><i>def make_requests(self, req, ring, part, method, path, headers,</i></font><br>
<font size="2" face="serif"><i>                      query_string=''):</i></font><br>
<br>
<font size="2" color="#0000FF" face="Monospace"><i>def</i></font><font size="2" face="Monospace"><i> </i></font><font size="2" face="Monospace"><i>_make_request</i></font><font size="2" face="Monospace"><i>(</i></font><font size="2" face="Monospace"><i>self</i></font><font size="2" face="Monospace"><i>, nodes, part, method, path, headers, query,</i></font><br>
<font size="2" face="Monospace"><i>                      logger_thread_locals):</i></font><font size="2" face="sans-serif"><br>
</font><br>
<br>
<img width="16" height="16" src="cid:1.580835542@web193606.mail.sg3.yahoo.com" border="0" alt="Inactive hide details for pragya jain ---2013-09-27 下午 02:55:44---pragya jain <prag_2648@yahoo.co.in>"><font size="2" color="#424282" face="sans-serif">pragya jain ---2013-09-27 下午 02:55:44---pragya jain <prag_2648@yahoo.co.in></font><br>
<br>

</div><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody><tr valign="top"><td style="background-image:url(cid:2__=C7BBF160DFB999088f9e8a93df938@cn.ibm.com);background-repeat:no-repeat;" width="40%">

</td><td width="60%">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tbody><tr valign="top"><td width="1%"><img width="58" height="1" src="cid:2.580835542@web193606.mail.sg3.yahoo.com" border="0" alt=""><br>
<div align="right"><font size="1" face="sans-serif">To</font></div></td><td width="100%"><img width="1" height="1" src="cid:2.580835542@web193606.mail.sg3.yahoo.com" border="0" alt=""><br>


</td></tr>

<tr valign="top"><td width="1%"><img width="58" height="1" src="cid:2.580835542@web193606.mail.sg3.yahoo.com" border="0" alt=""><br>
<div align="right"><font size="1" face="sans-serif">cc</font></div></td><td width="100%"><img width="1" height="1" src="cid:2.580835542@web193606.mail.sg3.yahoo.com" border="0" alt=""><br>


</td></tr>

<tr valign="top"><td width="1%"><img width="58" height="1" src="cid:2.580835542@web193606.mail.sg3.yahoo.com" border="0" alt=""><br>
<div align="right"><font size="1" face="sans-serif">Subject</font></div></td><td width="100%"><img width="1" height="1" src="cid:2.580835542@web193606.mail.sg3.yahoo.com" border="0" alt=""><br>


</td></tr>
</tbody></table>

<table border="0" cellspacing="0" cellpadding="0">
<tbody><tr valign="top"><td width="58"><img width="1" height="1" src="cid:2.580835542@web193606.mail.sg3.yahoo.com" border="0" alt=""></td><td width="336"><img width="1" height="1" src="cid:2.580835542@web193606.mail.sg3.yahoo.com" border="0" alt=""></td></tr>
</tbody></table>
</td></tr>
</tbody></table>
<br>
<font size="3" face="Times">Thanks Zhang for the reply.</font><br>
<font size="3" face="Bookman Old Style">but my question is:</font><br>
<font size="3" face="Bookman Old Style">According to swift source code,</font><br>
<font size="3" face="Bookman Old Style">through which function call, the proxy server interact with account server, i.e., flow of control go from proxy server code to account server code?</font><br>
<br>
<font size="3" face="Bookman Old Style">Thanks again</font><br>
<br>
<font size="3" face="Bookman Old Style">Pragya Jain</font><br>
<br>


</div></div><img src="cid:3.580835543@web193606.mail.sg3.yahoo.com"><br><br></div> </div> </div> </blockquote></div>   </div></body></html>