From Yaniv Bronhaim <>:

Yaniv Bronhaim has uploaded a new change for review.

Change subject: Handling fatal fail in supervdsm when log conf is invalid

Handling fatal fail in supervdsm when log conf is invalid

Copying same treatment we use in when we have a fail in loading
logging conf. Currently implementation tried to use stdout and it fails
when running as systemd service. See bugzilla for more details.

Change-Id: Idb37e6ba92483599dfef57e4e8fb3cc22f9aa016
Signed-off-by: Yaniv Bronhaim <>
M lib/vdsm/
1 file changed, 12 insertions(+), 11 deletions(-)

  git pull ssh:// refs/changes/31/80231/1

diff --git a/lib/vdsm/ b/lib/vdsm/
index c4baf8f..df181f1 100644
--- a/lib/vdsm/
+++ b/lib/vdsm/
@@ -38,17 +38,6 @@
 from vdsm.common import time
 from vdsm.common import zombiereaper
-LOG_CONF_PATH = "/etc/vdsm/svdsm.logger.conf"
-    logging.config.fileConfig(LOG_CONF_PATH, disable_existing_loggers=False)
-    logging.basicConfig(filename='/dev/stdout', filemode='w+',
-                        level=logging.DEBUG)
-    log = logging.getLogger("SuperVdsm.Server")
-    log.warn("Could not init proper logging", exc_info=True)
 from multiprocessing import Pipe, Process
     from vdsm.gluster import listPublicFunctions
@@ -80,10 +69,22 @@
 _running = True
+class FatalError(Exception):
+    """ Raised when supervdsm fails to start """
 class Timeout(RuntimeError):
+LOG_CONF_PATH = "/etc/vdsm/svdsm.logger.conf"
+    logging.config.fileConfig(LOG_CONF_PATH, disable_existing_loggers=False)
+except RuntimeError as e:
+    raise FatalError("Cannot configure logging: %s" % e)
 def logDecorator(func):
     callbackLogger = logging.getLogger("SuperVdsm.ServerCallback")

To view, visit
To unsubscribe, visit

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb37e6ba92483599dfef57e4e8fb3cc22f9aa016
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <>
vdsm-patches mailing list --
To unsubscribe send an email to

Reply via email to