From 348f208d4d380b348a01078ca3ed1bddc4d9f433 Mon Sep 17 00:00:00 2001 From: "Blake J. Harnden" Date: Mon, 20 Aug 2018 16:01:51 -0700 Subject: [PATCH] added cleared exception logging for booting services and fixed rest issue with loading an xml file --- daemon/core/service.py | 6 +++++- webapp/app.py | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/daemon/core/service.py b/daemon/core/service.py index eab63141..7355956f 100644 --- a/daemon/core/service.py +++ b/daemon/core/service.py @@ -447,7 +447,11 @@ class CoreServices(object): """ logger.info("booting node services: %s", boot_path) for service in boot_path: - self.boot_service(node, service) + try: + self.boot_service(node, service) + except: + logger.exception("error booting service: %s", service.name) + raise def boot_service(self, node, service): """ diff --git a/webapp/app.py b/webapp/app.py index 7f35b800..8ae6c497 100644 --- a/webapp/app.py +++ b/webapp/app.py @@ -171,6 +171,8 @@ def save_xml(session_id): @app.route("/sessions/xml", methods=["POST"]) def open_xml(): session = coreemu.create_session() + session.set_state(EventTypes.CONFIGURATION_STATE) + logger.info("open xml: %s", request.files) _, temp_path = tempfile.mkstemp() session_file = request.files['session']