diff options
| author | Ben Pfaff <blp@nicira.com> | 2011-03-29 10:09:23 -0700 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2011-03-29 10:09:23 -0700 |
| commit | 2159de839136af40641738284c7eabde1b0fc72b (patch) | |
| tree | e5f6abc7b151be97fad2b0d7ee14566a9ad171c6 /python/ovs/daemon.py | |
| parent | 0dd17bfdfed067cd15f764a5c741625c4c118ac8 (diff) | |
| download | openvswitch-2159de839136af40641738284c7eabde1b0fc72b.tar.gz | |
daemon: Write "already running" message to log also.
Otherwise it's hard to diagnose later if the daemon failed to start because
it thinks that it is already running.
Diffstat (limited to 'python/ovs/daemon.py')
| -rw-r--r-- | python/ovs/daemon.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/python/ovs/daemon.py b/python/ovs/daemon.py index 6dff3a02f..83ae8cd13 100644 --- a/python/ovs/daemon.py +++ b/python/ovs/daemon.py @@ -1,4 +1,4 @@ -# Copyright (c) 2010 Nicira Networks +# Copyright (c) 2010, 2011 Nicira Networks # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -141,7 +141,9 @@ def die_if_already_running(): ignore_existing_pidfile() has been called, terminate the program.""" if _already_running(): if not _overwrite_pidfile: - sys.stderr.write("%s: already running\n" % get_pidfile()) + msg = "%s: already running" % _pidfile + logging.error("%s, aborting" % msg) + sys.stderr.write("%s\n" % msg) sys.exit(1) else: logging.warn("%s: %s already running" |
