Cloned from launchpad blueprint https://blueprints.launchpad.net/glance/+spec/use-common-service-framework.
Currently other openstack projects like nova, cinder, keystone etc. are using oslo-incubator service framework to launch the services. Similar to these projects glance should also use this service framework to launch the services.
As of now when SIGHUP signal is sent to glance-api parent process, it calls the callback handler and then throws OSError. The OSError is thrown because os.wait system call was interrupted due to SIGHUP callback handler. As a result of this parent process closes the server socket. All the child processes also gets terminated without completing existing api requests because the server socket is already closed and the glance service fails to restart.
Ideally when SIGHUP signal is received by the glance-api process, it should process all the pending requests and then restart the glance-api service.
If oslo-incubator's common service framework is used in glance then it will handle service restart on ‘SIGHUP’ signal properly.
Specification URL (additional information):