You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mesos.apache.org by Marc Roos <M....@f1-outsourcing.eu> on 2019/08/19 14:18:33 UTC
Alternative to mesos-dns?
It looks like mesos-dns does not report all ip adresses of a container.
Is there an alternative for this?
I wanted to have a look at the source myself, but have dependency
problems(??). What I have noticed is that the developer is probably not
testing with multiple ip addresses[1]. And I think the problem is that
there should be an array of IPAddresses[2]. (Maybe obvious, since I am
getting the last result)
Below is my master output[3] with two networks.
[0]
https://github.com/mesosphere/mesos-dns/issues/541
[1]
https://github.com/mesosphere/mesos-dns/blob/950727920838971032731d6d8389a3cc44c5798b/factories/fake.json#L81
[2]
https://github.com/mesosphere/mesos-dns/blob/211986ed6af9de08332adc696ceb20191e1aa36f/records/state/state.go#L73
[3]
{
"tasks": [
{
"id":
"mail_out_sendmail.instance-2b210f58-ba1f-11e9-8333-0050563001a1._app.1"
,
"name": "sendmail.out.mail",
"framework_id": "d5168fcd-51be-48c3-ba64-ade27ab23c4e-0000",
"executor_id": "",
"slave_id": "0c15c45f-310b-4fc2-8275-b0bfa1bdfdcb-S0",
"state": "TASK_RUNNING",
"resources": {
"disk": 0,
"mem": 256,
"gpus": 0,
"cpus": 1
},
"role": "marathon",
"statuses": [
{
"state": "TASK_STARTING",
"timestamp": 1565297867.809255,
"container_status": {
"container_id": {
"value": "f787d770-0e6b-4aa8-af43-cb11cd34ae17"
},
"network_infos": [
{
"labels": [
{
"key": "CNI_ARGS",
"value": "IP=1.1.1.1"
}
],
"ip_addresses": [
{
"protocol": "IPv4",
"ip_address": "1.1.1.1"
}
],
"name": "cni-apps-public"
},
{
"labels": [],
"ip_addresses": [
{
"protocol": "IPv4",
"ip_address": "2.2.2.2"
}
],
"name": "cni-apps"
}
]
}
},
{
"state": "TASK_RUNNING",
"timestamp": 1565297943.300649,
"container_status": {
"container_id": {
"value": "f787d770-0e6b-4aa8-af43-cb11cd34ae17"
},
"network_infos": [
{
"labels": [
{
"key": "CNI_ARGS",
"value": "IP=1.1.1.1"
}
],
"ip_addresses": [
{
"protocol": "IPv4",
"ip_address": "1.1.1.1"
}
],
"name": "cni-apps-public"
},
{
"labels": [],
"ip_addresses": [
{
"protocol": "IPv4",
"ip_address": "2.2.2.2"
}
],
"name": "cni-apps"
}
]
},
"healthy": true
}
],
"user": "root",
"discovery": {
"visibility": "FRAMEWORK",
"name": "sendmail.out.mail",
"ports": {
"ports": [
{
"number": 0,
"name": "default",
"protocol": "tcp",
"labels": {
"labels": [
{
"key": "network-scope",
"value": "container"
},
{
"key": "network-name",
"value": "cni-apps"
}
]
}
},
{
"number": 0,
"name": "default",
"protocol": "tcp",
"labels": {
"labels": [
{
"key": "network-scope",
"value": "container"
},
{
"key": "network-name",
"value": "cni-apps-public"
}
]
}
}
]
}
},
"container": {
"type": "MESOS",
"volumes": [
{
"mode": "RW",
"container_path": "/dev/log",
"host_path": "/dev/log"
}
],
"mesos": {
"image": {
"type": "DOCKER",
"docker": {
"name": "sendmail"
},
"cached": false
}
},
"network_infos": [
{
"ip_addresses": [
{
"protocol": "IPv4"
}
],
"name": "cni-apps",
"labels": {}
},
{
"ip_addresses": [
{
"protocol": "IPv4"
}
],
"name": "cni-apps-public",
"labels": {
"labels": [
{
"key": "CNI_ARGS",
"value": "IP=1.1.1.1"
}
]
}
}
]
},
"health_check": {
"delay_seconds": 15,
"interval_seconds": 30,
"timeout_seconds": 5,
"consecutive_failures": 3,
"grace_period_seconds": 300,
"type": "TCP",
"tcp": {
"protocol": "IPv4",
"port": 25
}
}
}
]
}