]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Cinder-api service throws error on SIGHUP signal
authorAnkit Agrawal <ankit11.agrawal@nttdata.com>
Fri, 4 Jul 2014 10:41:17 +0000 (03:41 -0700)
committerankitagrawal <ankit11.agrawal@nttdata.com>
Mon, 14 Jul 2014 09:21:05 +0000 (02:21 -0700)
commit4caca0dfae45dd6c61ddc1b4a2233d2ce1a11685
tree5a8a29f3103129f5703aec5b110b42383aaceedd
parentc15d2640f49d6a3c82c3135e40bc3b61f96f1752
Cinder-api service throws error on SIGHUP signal

Added reset method in WSGIService class.

After adding reset method when SIGHUP signal is sent to
wsgi service parent process,then it sends SIGHUP signal
to all of its child processes. Each child process handles
SIGHUP signal by first stopping the service and then calls
service start method again. When it stops the service, it
kills the eventlet thread, which internally closes the wsgi
server socket object. This server socket object is now not
usable again and it throws following error, while restarting
the service:

error: [Errno 9] Bad file descriptor

To resolve 'Bad file descriptor' error, creating duplicate
socket object, every time service starts.

Closes-Bug: #1337796

Change-Id: Iab32a3fe230a11692a8cad274304214247d6c2c6
cinder/service.py
cinder/tests/test_service.py
cinder/tests/test_wsgi.py
cinder/wsgi.py