Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Add try .... except .... change to line 386 only solve cinder-scheduler or nova-compute service which is the similar implementation stop raise exception. However, all cinder-volume queue be removed when one of multi-cinder-volume service stop. It is another problem.

I use pdb module to trace two different sevice stop(cinder-scheduler and cinder-volume). Let me describe two different implemention stop service.

cinder-scheduler catch the signal to stop will to call _launcher.stop() cinder/service.py line 612 _launcher.stop() will kill all service thread which run service.start and service.wait . After thread killed, I found that connection.session.recievers is [], that means all consumer released. I'm not sure connection closed or not. I found that the method kill() of class service not be called.

cinder-volume launch two processes, service run in child process (service.py line 227) and parent process watch the status of child. When parent process catch to stop signal, it send the stop signal to child process. child process will catch signal and call service.stop (service.py line 239)

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) qpid will remove receivers of session, then MessageCancel and QueueDelete will set to qpidd. I think QueueDelete told the qpidd to delete all cinder-volume queues.