summaryrefslogtreecommitdiff
path: root/tests/test-daemon.py
Commit message (Collapse)AuthorAgeFilesLines
* Global replace of Nicira Networks.Raju Subramanian2012-05-021-1/+1
| | | | | | | | Replaced all instances of Nicira Networks(, Inc) to Nicira, Inc. Feature #10593 Signed-off-by: Raju Subramanian <rsubramanian@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
* python: Upgrade to vlog.Ethan Jackson2011-09-271-1/+0
| | | | | This patch upgrades the library code in the python/ovs directory to the new vlog module.
* python: Upgrade daemon module to argparse.Ethan Jackson2011-09-271-33/+11
| | | | This patch also updates it's callers.
* tests: Cleanup test-daemon.py style.Ethan Jackson2011-09-161-1/+4
| | | | | By convention, unused arguments should be named "_" and top level definitions should be separated by two spaces.
* daemon: Avoid races on pidfile creation.Ben Pfaff2011-04-041-0/+2
| | | | | | | | | | | | | | | | | | Until now, if two copies of one OVS daemon started up at the same time, then due to races in pidfile creation it was possible for both of them to start successfully, instead of just one. This was made worse when a previous copy of the daemon had died abruptly, leaving a stale pidfile. This commit implements a new pidfile creation and removal protocol that I believe closes these races. Now, a pidfile is asserted with "link" instead of "rename", which prevents the race on creation, and a stale pidfile may only be deleted by a process after it has taken a lock on it. This may solve mysterious problems seen occasionally on vswitch restart. I'm still puzzled by these problems, however, because I don't see anything in our tests cases that would actually cause two copies of a daemon to start at the same time, which as far as I can see is a necessary precondition for the problem.
* daemon: Integrate checking for an existing pidfile into daemonize_start().Ben Pfaff2011-04-041-2/+1
| | | | | | | | | | | | Until now, it has been the responsibility of an individual daemon to call die_if_already_running() at an appropriate time. A long time ago, this had to happen *before* daemonizing, because once the process daemonized itself there was no way to report failure to the process that originally started the daemon. With the introduction of daemonize_start(), this is now possible, but we haven't been taking advantage of it. Therefore, this commit integrates the die_if_already_running() call into daemonize_start() and deletes the calls to it from individual daemons.
* tests: Test that children restart with special exit codeEthan Jackson2010-09-231-1/+14
| | | | | Added a test which checks that the python daemon code properly restarts child processes which exit with RESTART_EXIT_CODE.
* tests: Remove trailing whitespace from python daemon testsEthan Jackson2010-09-221-3/+3
| | | | | Removes the trailing whitespace from the testing code related to daemonizing in Python.
* Implement initial Python bindings for Open vSwitch database.Ben Pfaff2010-08-251-0/+66
These initial bindings pass a few hundred of the corresponding tests for C implementations of various bits of the Open vSwitch library API. The poorest part of them is actually the Python IDL interface in ovs.db.idl, which has not received enough attention yet. It appears to work, but it doesn't yet support writes (transactions) and it is difficult to use. I hope to improve it as it becomes clear what semantics Python applications actually want from an IDL.