[ARVADOS] created: 1.1.4-224-ged06a61
Git user
git at public.curoverse.com
Mon May 7 13:18:08 EDT 2018
at ed06a616ad22aa20363517786a5240c650c14b9f (commit)
commit ed06a616ad22aa20363517786a5240c650c14b9f
Author: Tom Clegg <tclegg at veritasgenetics.com>
Date: Mon May 7 13:17:33 2018 -0400
13323: Avoid opening /dev/std*, to accommodate systemd.
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg at veritasgenetics.com>
diff --git a/services/nodemanager/arvnodeman/launcher.py b/services/nodemanager/arvnodeman/launcher.py
index 888abf5..730792b 100644
--- a/services/nodemanager/arvnodeman/launcher.py
+++ b/services/nodemanager/arvnodeman/launcher.py
@@ -58,7 +58,14 @@ def load_config(path):
return config
def setup_logging(path, level, **sublevels):
- handler = logging.FileHandler(path)
+ if path == '/dev/stdout':
+ # Opening /dev/stdout does not work in systemd:
+ # https://github.com/systemd/systemd/issues/2473
+ handler = logging.StreamHandler(stream=sys.stdout)
+ elif path == '/dev/stderr':
+ handler = logging.StreamHandler(stream=sys.stderr)
+ else:
+ handler = logging.FileHandler(path)
handler.setFormatter(logging.Formatter(
'%(asctime)s %(name)s[%(process)d] %(levelname)s: %(message)s',
'%Y-%m-%d %H:%M:%S'))
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list