Comment 6 for bug 1334651

Revision history for this message
Tiantian Gao (gtt116) wrote : Re: [Bug 1334651] Re: Nova api service outputs error messages when SIGHUP signal is sent

Hi Rajesh,

Thank you very much for the patch. It works well for me.

2014-11-04 19:00 GMT+08:00 Rajesh Tailor <email address hidden>:

> Hi Tiantian,
>
> You need to run the nova-api service as daemon.
>
> Steps to reproduce:
> 1. Run nova-api service as daemon.
> 2. Send SIGHUP signal to nova-api service
> kill -1 <parent_process_id_of_nova_api>
>
> Just for testing in your environment, you can use below work around to
> fulfill step 1.
>
> diff --git a/nova/openstack/common/service.py
> b/nova/openstack/common/servic
> index f682b2b..12127d6 100644
> --- a/nova/openstack/common/service.py
> +++ b/nova/openstack/common/service.py
> @@ -77,7 +77,7 @@ def _is_sighup_and_daemon(signo):
> # Avoid checking if we are a daemon, because the signal isn't
> # SIGHUP.
> return False
> - return _is_daemon()
> + return True
>
> def _signo_to_signame(signo):
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1334651
>
> Title:
> Nova api service outputs error messages when SIGHUP signal is sent
>
> Status in OpenStack Compute (Nova):
> Fix Released
> Status in The Oslo library incubator:
> Triaged
>
> Bug description:
> When SIGHUP signal is send to nova-api service, it stops all the nova-
> api processes and while restarting the nova-api processes, it throws
> AttributeError: 'WSGIService' object has no attribute 'reset'.
>
>
> 2014-06-24 15:52:55.185 CRITICAL nova [-] AttributeError: 'WSGIService'
> object has no attribute 'reset'
>
> 2014-06-24 15:52:55.185 TRACE nova Traceback (most recent call last):
> 2014-06-24 15:52:55.185 TRACE nova File "/usr/local/bin/nova-api",
> line 10, in <module>
> 2014-06-24 15:52:55.185 TRACE nova sys.exit(main())
> 2014-06-24 15:52:55.185 TRACE nova File
> "/opt/stack/nova/nova/cmd/api.py", line 56, in main
> 2014-06-24 15:52:55.185 TRACE nova launcher.launch_service(server,
> workers=server.workers or 1)
> 2014-06-24 15:52:55.185 TRACE nova File
> "/opt/stack/nova/nova/openstack/common/service.py", line 340, in
> launch_service
> 2014-06-24 15:52:55.185 TRACE nova self._start_child(wrap)
> 2014-06-24 15:52:55.185 TRACE nova File
> "/opt/stack/nova/nova/openstack/common/service.py", line 324, in
> _start_child
> 2014-06-24 15:52:55.185 TRACE nova launcher.restart()
> 2014-06-24 15:52:55.185 TRACE nova File
> "/opt/stack/nova/nova/openstack/common/service.py", line 145, in restart
> 2014-06-24 15:52:55.185 TRACE nova self.services.restart()
> 2014-06-24 15:52:55.185 TRACE nova File
> "/opt/stack/nova/nova/openstack/common/service.py", line 478, in restart
> 2014-06-24 15:52:55.185 TRACE nova restart_service.reset()
> 2014-06-24 15:52:55.185 TRACE nova AttributeError: 'WSGIService' object
> has no attribute 'reset'
> 2014-06-24 15:52:55.185 TRACE nova
>
> Steps to reproduce:
> 1. Run nova-api service as daemon.
> 2. Send SIGHUP signal to nova-api service
> kill -1 <parent_process_id_of_nova_api>
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/nova/+bug/1334651/+subscriptions
>

--
Best regards,
Tim Gao