aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorasteroide <thomas.duval@orange.com>2017-06-29 14:53:58 +0200
committerasteroide <thomas.duval@orange.com>2017-06-29 14:53:58 +0200
commit901a4bb572551a03da79017306bf41fd3848b6d2 (patch)
tree96b5a8768efa8183466217c0b9f7e534054f629e
parentaba2806d6c399c89be0af2617267e75331d217d9 (diff)
Add a log when the PID file cannot be written in /var/run
Change-Id: Ibcecd6a631c5ee0bd7e9012ba15f6efcb4f61373
-rw-r--r--moonv4/moon_orchestrator/moon_orchestrator/server.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/moonv4/moon_orchestrator/moon_orchestrator/server.py b/moonv4/moon_orchestrator/moon_orchestrator/server.py
index 85d7d3f4..a4e50f1a 100644
--- a/moonv4/moon_orchestrator/moon_orchestrator/server.py
+++ b/moonv4/moon_orchestrator/moon_orchestrator/server.py
@@ -108,6 +108,7 @@ def __save_pid():
open("/var/run/moon_orchestrator.pid", "w").write(str(os.getpid()))
except PermissionError:
LOG.warning("You don't have the right to write PID file in /var/run... Continuing anyway.")
+ LOG.warning("Writing PID file in {}".format(os.getcwd()))
open("./moon_orchestrator.pid", "w").write(str(os.getpid()))