ProcessLauncher should support reloading config file for parent process on receiving SIGHUP

Bug #1433142 reported by Elena Ezhova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Davanum Srinivas (DIMS)
neutron
Fix Released
Medium
Elena Ezhova
oslo-incubator
Fix Released
Medium
Elena Ezhova

Bug Description

Currently, when a parent process receives SIGHUP it just sends SIGHUP to its children. While children reload their config files and call reset on their services, parent continues to run with old config.

Elena Ezhova (eezhova)
Changed in oslo-incubator:
assignee: nobody → Elena Ezhova (eezhova)
description: updated
Revision history for this message
Elena Ezhova (eezhova) wrote :
Changed in oslo-incubator:
status: New → In Progress
Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Tested against both nova and neutron latest trunk. works well.

Changed in oslo-incubator:
status: In Progress → Fix Committed
Revision history for this message
Elena Ezhova (eezhova) wrote :

@Dims, did you test this for ProcessLauncher? Because now only ServiceLauncher is supposed to reload parent config on SIGHUP.

Revision history for this message
Elena Ezhova (eezhova) wrote :

I have tested nova-api master too (as well as neutron) the following way:

1. Added logging to nova.service.reset method:

ash@ubuntu:/opt/stack/nova$ git diff
diff --git a/nova/service.py b/nova/service.py
index 3ae307c..5f4e952 100644
--- a/nova/service.py
+++ b/nova/service.py
@@ -366,6 +366,7 @@ class WSGIService(object):
         :returns: None

         """
+ LOG.exception("Calling reset!")
         self.server.reset()

     def _get_manager(self):

2. Changed logging format in nova.conf to show pids

3. Started nova-api in daemon mode with the default number of workers (metadata_workers = 2, ec2_workers = 2, osapi_compute_workers = 2)

4. Verified that all processes are running:

ash@ubuntu:~/devstack$ ps -ef | grep nova-api
ash 11999 9714 0 13:00 pts/10 00:00:04 /usr/bin/python /usr/local/bin/nova-api
ash 12008 11999 0 13:00 pts/10 00:00:00 /usr/bin/python /usr/local/bin/nova-api
ash 12009 11999 0 13:00 pts/10 00:00:00 /usr/bin/python /usr/local/bin/nova-api
ash 12010 11999 0 13:00 pts/10 00:00:00 /usr/bin/python /usr/local/bin/nova-api
ash 12011 11999 0 13:00 pts/10 00:00:00 /usr/bin/python /usr/local/bin/nova-api
ash 12018 11999 0 13:00 pts/10 00:00:00 /usr/bin/python /usr/local/bin/nova-api
ash 12019 11999 0 13:00 pts/10 00:00:00 /usr/bin/python /usr/local/bin/nova-api
ash 12245 8600 0 13:10 pts/32 00:00:00 grep --color=auto nova-api

5. Sent SIGHUP to the parent process:

ash@ubuntu:~/devstack$ kill -HUP 11999

6. Checked nova-api's logs: http://paste.openstack.org/show/195347/

Please note, that the parent process (pid = 11999) didn't call reset().

The situation is the same for all services that use ProcessLauncher including neutron. Please, correct me, if there is something I'm missing.

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Looks like i just tested nova-compute and not nova api for reload of config files...!

Elena Ezhova (eezhova)
Changed in oslo-incubator:
status: Fix Committed → In Progress
Changed in nova:
importance: Undecided → Medium
Changed in oslo-incubator:
importance: Undecided → Medium
Sean Dague (sdague)
Changed in nova:
status: New → Confirmed
milestone: none → kilo-rc1
assignee: nobody → Davanum Srinivas (DIMS) (dims-v)
Elena Ezhova (eezhova)
Changed in neutron:
assignee: nobody → Elena Ezhova (eezhova)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/167470

Changed in nova:
status: Confirmed → In Progress
Elena Ezhova (eezhova)
Changed in oslo-incubator:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/167470
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=31dfcac6105751f6857215c4a89869d5a779a2fd
Submitter: Jenkins
Branch: master

commit 31dfcac6105751f6857215c4a89869d5a779a2fd
Author: Davanum Srinivas <email address hidden>
Date: Tue Mar 24 21:43:38 2015 -0400

    Sync from Oslo-Incubator - reload config files

    Syncing change I132865fc5c3a12baf02f2991fc82701adfc7ed67 from
    oslo-incubator to fix a Nova bug

    Closes-Bug: #1433142
    Change-Id: Ia4077324f23c6cbdaa54c79341992528f6c6d2cd

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/167974

Changed in neutron:
status: New → In Progress
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/167974
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=f92d22d91b8a29a0088c69a1cf4940c822d38847
Submitter: Jenkins
Branch: master

commit f92d22d91b8a29a0088c69a1cf4940c822d38847
Author: Elena Ezhova <email address hidden>
Date: Thu Mar 26 15:33:36 2015 +0300

    Sync service from oslo-incubator

    This sync includes changes that are required to fix handling
    of SIGHUP in Neutron.

    The following changes and bugfixes are included:

    d24b658 Revert "Optimization of waiting subprocesses in ProcessLauncher"
    593005b ProcessLauncher: reload config file in parent process on SIGHUP
    f29e865 Store ProcessLauncher signal handlers on class level
    bf92010 Optimization of waiting subprocesses in ProcessLauncher

    Change-Id: If0aab4e8978422346f6ba4c9e6272cdaf39db6cb
    Closes-Bug: #1433142
    Related-Bug: #1276694

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in oslo-incubator:
milestone: none → 2015.1.0
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: kilo-rc1 → 2015.1.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (neutron-pecan)

Fix proposed to branch: neutron-pecan
Review: https://review.openstack.org/185072

Thierry Carrez (ttx)
Changed in neutron:
milestone: none → liberty-1
status: Fix Committed → Fix Released
Changed in neutron:
importance: Undecided → Medium
Thierry Carrez (ttx)
Changed in neutron:
milestone: liberty-1 → 7.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.