[ovs-git] Open vSwitch: worker: Prevent worker from being responsible for pidfile deletion. (branch-1.11)

dev at openvswitch.org dev at openvswitch.org
Tue Apr 30 00:17:44 UTC 2013


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Open vSwitch".

The branch, branch-1.11 has been updated
       via  7ffd3f6972b41827d7b03e10dcbb0a4c20e4d919 (commit)
       via  9f27568d9f6615b486bd13324b9a607864ef8780 (commit)
       via  488232b7ec7921753ec27ffd836a51f23afae0b8 (commit)
       via  0d121c735093ada40dfd2aa5cdba36d27c6b8389 (commit)
       via  95ddb070ca6091ab666e03bea144d096a579d6c5 (commit)
       via  9f31efc731090e8d33236c55a4adbf461f3acbd1 (commit)
      from  8fedda413c44c4021e6df910b6a42751e43c6c9c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7ffd3f6972b41827d7b03e10dcbb0a4c20e4d919
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=7ffd3f6972b41827d7b03e10dcbb0a4c20e4d919
Author: Gurucharan Shetty <gshetty at nicira.com>
		
worker: Prevent worker from being responsible for pidfile deletion.
		
Currently we are creating the worker process after creation of the pidfile.
This means that the responsibility of deleting the pidfile after process
termination rests with the worker process.

When we restart openvswitch using the startup scripts, we SIGTERM the main
process and once it is cleaned up, we start ovs-vswitchd again. This results
in a race condition. The new ovs-vswitchd will create a pidfile because it is
unlocked. But, if the old worker process exits after the start of new
ovs-vswitchd, it will simply delete the pidfile underneath the new ovs-vswitchd.
This will eventually result in multiple ovs-vswitchd daemons.

This patch gives the responsibility of deleting the pidfile to the main
process.

Bug #16669.
Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>


commit 9f27568d9f6615b486bd13324b9a607864ef8780
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=9f27568d9f6615b486bd13324b9a607864ef8780
Author: Gurucharan Shetty <gshetty at nicira.com>
		
vswitchd: Disable system stats collection on a concurrently running daemon.
		
There are very rare cases (ex: ovs-vswitchd.pid is inadvertantly deleted),
when multiple ovs-vswitchd daemons can end up running at the same time.
In a situation like that one of the daemons can wait on the poll()
with a 0 ms wait time as it would be expecting system stats to be collected.

But system stats are never run for the daemon that does not have the
lock on the database and hence it takes up 100% of the CPU if its state
machine for stats collection previously was S_WAITING.

With this patch, we disable the system stats collection for the daemon that
does not have the database lock. When it eventually gets the lock on the
database, system stats are automatically enabled if other_config:\
enable-statistics=true.

Bug #16669.
Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>


commit 488232b7ec7921753ec27ffd836a51f23afae0b8
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=488232b7ec7921753ec27ffd836a51f23afae0b8
Author: Ben Pfaff <blp at nicira.com>
		
netlink-socket: Use xmalloc() instead of malloc().
		
This was the only obvious use of bare malloc() in the tree, other
than in the implementation of wrapper functions.

Signed-off-by: Ben Pfaff <blp at nicira.com>


commit 0d121c735093ada40dfd2aa5cdba36d27c6b8389
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=0d121c735093ada40dfd2aa5cdba36d27c6b8389
Author: Ben Pfaff <blp at nicira.com>
		
netlink-socket: Minor style fix.
		
Signed-off-by: Ben Pfaff <blp at nicira.com>


commit 95ddb070ca6091ab666e03bea144d096a579d6c5
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=95ddb070ca6091ab666e03bea144d096a579d6c5
Author: Ben Pfaff <blp at nicira.com>
		
timeval: Remove prototype for unimplemented function.
		
Signed-off-by: Ben Pfaff <blp at nicira.com>


commit 9f31efc731090e8d33236c55a4adbf461f3acbd1
Diffs: http://openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=commitdiff;h=9f31efc731090e8d33236c55a4adbf461f3acbd1
Author: Justin Pettit <jpettit at nicira.com>
		
Prepare for post-1.11.0 (1.11.90).
		
Signed-off-by: Justin Pettit <jpettit at nicira.com>


-----------------------------------------------------------------------

Summary of changes:
 NEWS                 |    4 ++++
 configure.ac         |    2 +-
 debian/changelog     |    7 +++++++
 lib/daemon.c         |   27 +++++++++++++++++++++++++--
 lib/daemon.h         |    2 ++
 lib/netlink-socket.c |    8 ++------
 lib/timeval.h        |    1 -
 lib/worker.c         |    4 ++++
 vswitchd/bridge.c    |    4 ++++
 9 files changed, 49 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
Open vSwitch



More information about the git mailing list