Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
CLIPPER_MGMT_FRONTEND_CONTAINER_LABEL, CLIPPER_INTERNAL_RPC_PORT,
CLIPPER_INTERNAL_QUERY_PORT, CLIPPER_INTERNAL_MANAGEMENT_PORT)
from ..exceptions import ClipperException
from requests.exceptions import ConnectionError

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -91,6 +92,10 @@ def start_clipper(self, query_frontend_image, mgmt_frontend_image,
except docker.errors.APIError as e:
logger.debug(
"{nw} network already exists".format(nw=self.docker_network))
except ConnectionError:
msg = "Unable to connect to Docker. Please Check if Docker is running."
raise ClipperException(msg)


if not self.external_redis:
logger.info("Starting managed Redis instance in Docker")
Expand Down
5 changes: 3 additions & 2 deletions clipper_admin/clipper_admin/exceptions.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
class ClipperException(Exception):
"""A generic exception indicating that Clipper encountered a problem."""

pass
def __init__(self, msg, *args):
self.msg = msg
super(Exception, self).__init__(msg, *args)


class UnconnectedException(ClipperException):
Expand Down