Parcourir la source

Handle any connection validation errors in the worker.

The 'validate_endpoint_connection' conductor primitive should never
actually raise an Exception on validation issues, only return a tuple
indicating whether or not an error has occured and its message.
Nashwan Azhari il y a 5 ans
Parent
commit
055af7f805
1 fichiers modifiés avec 5 ajouts et 0 suppressions
  1. 5 0
      coriolis/worker/rpc/server.py

+ 5 - 0
coriolis/worker/rpc/server.py

@@ -404,6 +404,11 @@ class WorkerServerEndpoint(object):
         except exception.ConnectionValidationException as ex:
             is_valid = False
             message = str(ex)
+        except Exception as ex:
+            is_valid = False
+            message = (
+                "An unexpected connection validation exception "
+                "ocurred: %s" % str(ex))
 
         return (is_valid, message)