From c92ce40ddb2f5414a4ceca2fbbd6f0dc018563bc Mon Sep 17 00:00:00 2001 From: Jeff Ahrenholz Date: Wed, 10 Oct 2018 09:43:32 -0700 Subject: [PATCH 1/2] log warning when node.privatedir() raises an exception --- daemon/core/service.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/daemon/core/service.py b/daemon/core/service.py index 4c4f13f2..02b70831 100644 --- a/daemon/core/service.py +++ b/daemon/core/service.py @@ -466,7 +466,12 @@ class CoreServices(object): # create service directories for directory in service.dirs: - node.privatedir(directory) + try: + node.privatedir(directory) + except Exception, e: + logger.warn("error mounting private dir '%s' for service '%s': %s", + directory, service.name, e) + # create service files self.create_service_files(node, service) From 2e1bd23cce18a1ddbbf13111cfd879af5df460ff Mon Sep 17 00:00:00 2001 From: bharnden Date: Wed, 10 Oct 2018 15:21:26 -0700 Subject: [PATCH 2/2] #201 small changes to adapt to new error style and catch specific exceptions that may arise --- daemon/core/service.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/daemon/core/service.py b/daemon/core/service.py index 02b70831..3be36b4d 100644 --- a/daemon/core/service.py +++ b/daemon/core/service.py @@ -468,11 +468,10 @@ class CoreServices(object): for directory in service.dirs: try: node.privatedir(directory) - except Exception, e: + except (CoreCommandError, ValueError) as e: logger.warn("error mounting private dir '%s' for service '%s': %s", directory, service.name, e) - # create service files self.create_service_files(node, service)