Closed micahlmartin closed 8 years ago
Perhaps it should use the IP of the slave? It could look it up in the state.json also. That would solve my issue.
I see it looks like it looks up all of the IP's available, but when it registers the service it just grabs the first one -> https://github.com/CiscoCloud/mesos-consul/blob/fc352bfbf15ac285c21d4f5afca779e65c3efb53/state/state.go#L91.
I think that I'm going to have to make the IP lookup order configurable. Maybe something like adding a command line option --mesos-resolve=docker,mesos,host
with the default being netinfo,mesos,docker,host
.
yeah, I was thinking the same thing. Registrator uses the host IP by default and has the --internal
flag specifically for using the docker containers internal IP.
I have made mesos-consul
match the behavior of mesos-dns
. The default IP search order is netinfo,mesos,host
. That should work for you. Commit https://github.com/CiscoCloud/mesos-consul/commit/c652fca00f77e9f32d4c830c531dc1f5529d26b5 has this change. The v0.3 docker container has been updated.
Awesome! Thanks so much for the quick turn around time.
Hello !
not sure how's supposed to look for names : host is being ignored and external Ip is not in state.json:
"statuses": [ { "container_status": { "network_infos": [ { "ip_address": "172.17.0.4" } ] }, "labels": [ { "key": "Docker.NetworkSettings.IPAddress", "value": "172.17.0.4" } ], "state": "TASK_RUNNING", "timestamp": 1444952541.36739 } ]
host and mesos are ignored
"--mesos-ip-order=host,mesos,netinfo,docker"
ServiceName":"rxxx","ServiceTags":["nonprod"],"ServiceAddress":"172.17.0.2","ServicePort":31823}]
@marianodominguez Commit https://github.com/CiscoCloud/mesos-consul/commit/0791bff8901bd4dc81b8ab7a94957a7658a42640 should get host
working correctly.
Does indeed! Thanks for the fast fix.
On Thursday, October 15, 2015, ChrisAubuchon notifications@github.com wrote:
@marianodominguez https://github.com/marianodominguez Commit 0791bff https://github.com/CiscoCloud/mesos-consul/commit/0791bff8901bd4dc81b8ab7a94957a7658a42640 should get host working correctly.
— Reply to this email directly or view it on GitHub https://github.com/CiscoCloud/mesos-consul/issues/29#issuecomment-148577763 .
Mariano Domínguez Molina
thank you for this fix!
Perhaps my setup is wrong but I'm trying to figure out how to get the proper IP address registered in consul. When a new service is registered in Marathon it gets assigned a docker IP address:
The problem is that the
172.17.0.14
gets registered in consul but I wont actually be able to access that IP from outside the host. What I need to be able to do is have it register the IP address of the HOST so that I can access it. How are you guys handling this? Is there a better of way setting this up or am have I missed the boat completely?