Closed tgermain closed 9 years ago
Is the bad result the same in marathon or only marathon-consul? If it is we'll see about fixing it here, but if we're working with bad upstream data there's not much we can do, sadly.
I think about after posting the issue, it's related to marathon for sure.
The data in marathon are wrong, so it's not your fault. I'll contact marathon people to make it clearer.
Weird bug though! Thanks for clarifying.
Up : this is a known bug in marathon : https://github.com/mesosphere/marathon/issues/1365
The patch will be include in release 0.9, soon to be release.
Great! I've been testing with the RCs, so we should be good as soon as it's released. :D
Problem
I cannot understand the logic of port mapping and service port in marathon and using marthon-consul
Working part :
This is a json file describing an app running on Marathon and the result in my KV store in consul : https://gist.github.com/tgermain/32e0387ba9f1491a2aad
Note the Ports part in the KV store :
The specified port 30501 is still there, and the
servicePort=0
as been assigned to a free port of the host, here 10002.Not working part
Here a slightly different json file discribing the same app with a different portMapping and the result in my KV store in consul : https://gist.github.com/tgermain/add38414effe1557d612
Here is the problem :
There no trace of the port 30501 and consul-marathon ( & consul-template) interpret this as "easy-python-app is listening on port 0 on the host".
I don't think you can listen on port 0, with my fair knowledge on network.
Any hint ? Am I missing something in port mapping definition ? Is it related to marathon more than marathon-consul ?