Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

srv port lookup not the same as configured network #554

Open
f1-outsourcing opened this issue Aug 13, 2020 · 0 comments
Open

srv port lookup not the same as configured network #554

f1-outsourcing opened this issue Aug 13, 2020 · 0 comments

Comments

@f1-outsourcing
Copy link

f1-outsourcing commented Aug 13, 2020

I am launching a task with two networks.

"networks": [ 
	{ "mode": "container", "name": "cni-apps" },
	{ "mode": "container", "name": "cni-apps-demo" }
  ]

And this comes from dns:

[@~]$ dig +short server.dev.marathon.mesos
192.168.124.51
192.168.122.56
[@ ~]$ dig +short srv _server.dev._tcp.marathon.mesos
0 1 31025 server.dev-34ktw-s4.marathon.mesos.
0 1 31024 server.dev-34ktw-s4.marathon.mesos.

After scaling this task to two instances

[@~]$ dig +short server.dev.marathon.mesos
192.168.122.56
192.168.124.53
192.168.122.59
192.168.124.51
[@~]$ dig @192.168.10.14 +short  srv _server.dev._tcp.marathon.mesos
0 1 31025 server.dev-34ktw-s4.marathon.mesos.
0 1 31807 server.dev-m5ocg-s4.marathon.mesos.
0 1 31806 server.dev-m5ocg-s4.marathon.mesos.
0 1 31024 server.dev-34ktw-s4.marathon.mesos.

I think all the srv need to be unique, on this page[1] you can see in the example that the srv is having unique records. The reason for them to be all unique is that you have to specify what port is on what network[2]

This gives me the port

[@ ~]$ dig +short srv _metrics._server.dev._tcp.marathon.mesos
0 1 31025 server.dev-34ktw-s4.marathon.mesos.

And connecting will give me 2! Networks

[@~]$ ping server.dev-34ktw-s4.marathon.mesos.
PING server.dev-34ktw-s4.marathon.mesos (192.168.122.56) 56(84) bytes of data.
[@~]$ ping server.dev-34ktw-s4.marathon.mesos.
PING server.dev-34ktw-s4.marathon.mesos (192.168.124.51) 56(84) bytes of data.

Which is not according to the required configuration networkNames as in

{"hostPort": 0, "name": "health", "protocol": "tcp", "networkNames": ["cni-apps"] },
{"hostPort": 0, "name": "metrics", "protocol": "tcp", "networkNames": ["cni-apps"] }
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant