← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1223250] Re: Stale pid files exist after metadata namespace proxy is terminated

 

** Changed in: neutron
       Status: Fix Committed => Fix Released

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1223250

Title:
  Stale pid files exist after metadata namespace proxy is terminated

Status in OpenStack Neutron (virtual network service):
  Fix Released

Bug description:
  These pid files are not removed when shutdown sents SIGTERM.

  $ ps -ef | grep metadata-proxy
  root     17725     1  0 07:05 ?        00:00:00 /usr/bin/python /usr/local/bin/neutron-ns-metadata-proxy --pid_file=/opt/stack/data/neutron/external/pids/a1752c3b-cf08-4155-a268-e97ca5320221.pid --metadata_proxy_socket=/opt/stack/data/neutron/metadata_proxy --router_id=a1752c3b-cf08-4155-a268-e97ca5320221 --state_path=/opt/stack/data/neutron --metadata_port=9697 --debug --verbose

  $ ls -l /opt/stack/data/neutron/external/pids/a1752c3b-cf08-4155-a268-e97ca5320221.pid 
  -rwxr-xr-x 1 root root 5 Sep 10 07:05 /opt/stack/data/neutron/external/pids/a1752c3b-cf08-4155-a268-e97ca5320221.pid

  $ sudo kill 17725

  $ ls -l /opt/stack/data/neutron/external/pids/a1752c3b-cf08-4155-a268-e97ca5320221.pid 
  -rwxr-xr-x 1 root root 5 Sep 10 07:05 /opt/stack/data/neutron/external/pids/a1752c3b-cf08-4155-a268-e97ca5320221.pid

  
  In daemon.py delete_pid() is registerd with atexit.register() to remove the pid file when the process exits. https://github.com/openstack/neutron/blob/2013.2.b3/neutron/agent/linux/daemon.py#L125

  But the atexit man page says: "Functions registered using atexit()
  (and on_exit(3)) are not called if a process terminates abnormally
  because of the delivery of a signal."

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1223250/+subscriptions