Added log message to check compose file

Signed-off-by: Zuhayr Elahi <elahi.zuhayr@gmail.com>
This commit is contained in:
Zuhayr Elahi 2019-10-08 16:27:56 -07:00 committed by Nicolas De loof
parent cdae06a89c
commit 3135a0a839

View File

@ -623,6 +623,10 @@ class Service(object):
try: try:
container.start() container.start()
except APIError as ex: except APIError as ex:
if "driver failed programming external connectivity" in ex.explanation:
log.warn(
"Port is already in use, check the docker-compose file to see if the same" +
" port was allocated to multiple services")
raise OperationFailedError("Cannot start service %s: %s" % (self.name, ex.explanation)) raise OperationFailedError("Cannot start service %s: %s" % (self.name, ex.explanation))
return container return container