<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div>Hi Ray,<br></div>Thanks for your reply. <br>try .... except .... change to line 386 only solve cinder-scheduler or nova-compute service which is the similar implementation stop raise exception.<br>

</div>However,  all cinder-volume queue be removed when one of  multi-cinder-volume service stop. It is another problem. <br></div>I use pdb module to trace two different sevice stop(cinder-scheduler and cinder-volume).<br>

</div>I describe two different implemention stop service<br>cinder-scheduler catch the signal to stop will to call _launcher.stop() cinder/service.py line 612<br></div>_launcher.stop() will kill all service thread which run service.start and service.wait .<br>

</div>After thread killed, I found that connection.session.recievers is [], that means all consumer released. I'm not sure connection closed or not.<br></div>I found that the method kill() of class service not be called.<br>

<br></div>cinder-volume launch two processes,  service run in child process (service.py line 227) and parent process watch the status of child.<br></div>When parent process catch to stop signal, it send the stop signal to child process.<br>

</div>child process will catch signal and call service.stop (service.py  line 239)<br><br></div>And I use pdb to trace stop steps. I found that connection.session.receivers is not [] and including three receivers(cinder-volume, cinder-volume.node1, cinder-volume_fanout)<br>

</div>qpid will remove receivers of session, then MessageCancel and QueueDelete will set to qpidd.<br></div>I think QueueDelete told the qpidd to delete all cinder-volume queues.<br><div><div><div><div><br><div><div><div>

<div><div><br><br><br></div></div></div></div></div></div></div></div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013/5/30 Ray Pekowski <span dir="ltr"><<a href="mailto:pekowski@gmail.com" target="_blank">pekowski@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>I am not familiar with impl_qpid,py, but am familiar with amqp.py and have had problems around rpc_amqp.cleanup() the Pool.empty() method it calls.  It was a totally different problem, but I decided to take a look at your problem.  I noticed that in impl_qpid.py the only other place a connection.close() is done is surrounded by this code:<br>

<br>            # Close the session if necessary<br>            if self.connection.opened():<br>                try:<br>                    self.connection.close()<br>                except qpid_exceptions.ConnectionError:<br>

                    pass<br><br></div>I suggest you wrap the close at line 386 of impl_qpid.py with the same code and your problem will be fixed.  Here is the line identified from your call stack:<br><br>  File "/usr/lib/python2.6/site-<div class="im">
<div>
packages/cinder/openstack/common/rpc/impl_qpid.py", line 386, in close<br>

    self.connection.close()<br><br></div></div><div>If that works, open a bug report.<br><br></div><div>Good catch<span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><br>
</font></span></div><span class="HOEnZb"><font color="#888888">Ray<br></font></span></div>
</blockquote></div><br></div>