Can't Launch VIP task on ip-per-container network

Description

I'm trying to launch a task onto an ip-per-container docker network while also assigning it a Minuteman VIP.

I've created a docker network called "test" using the Calico network driver. Then I launch a task on that network and request a VIP using the following application definition:

{
"id": "calico-test-1",
"cpus": 0.1,
"mem": 128,
"instances": 1,
"container": {
"docker": {
"image": "nginx",
"network": "HOST",
"parameters": [
{
"key": "net",
"value": "test"
}
]
},
"type": "DOCKER"
},
"ipAddress": {
"discovery": {
"ports": [
{"number": 80,
"name": "http",
"protocol": "tcp",
"labels": {
"VIP_0": "1.2.3.4:5005"}
}
]
}
}
}

Minuteman requires a VIP_$ label in the ports protobuf to work. Since this is an IP-per-container application, the portMappings field cannot be specified, so I've used the ipAddress.discovery.ports field.

However, when launched, the task is not accessible by the VIP, and Minuteman is repeatedly printing this error in the logs:

```
Jun 30 13:13:16 a1.dcos env[5570]: 13:13:16.909 [error] Failed to parse task: {function_clause,[{mesos_state_client,protocol,[<<"client">>],[{file,"/pkg/src/minuteman/_build/default/lib/mesos_state/src/mesos_state_client.erl"},{line,405}]},{mesos_state_client,discovery_ports,2,[{file,"/pkg/src/minuteman/_build/default/lib/mesos_state/src/mesos_state_client.erl"},{line,389}]},{mesos_state_client,discovery,1,[{file,"/pkg/src/minuteman/_build/default/lib/mesos_state/src/mesos_state_client.erl"},{line,377}]},{mesos_state_client,task,3,[{file,"/pkg/src/minuteman/_build/default/lib/mesos_state/src/mesos_state_client.erl"},{line,199}]},{mesos_state_client,tasks,5,[{file,"/pkg/src/minuteman/_build/default/lib/mesos_state/src/mesos_state_client.erl"},{line,177}]},{mesos_state_client,executors,5,[{file,"/pkg/src/minuteman/_build/default/lib/mesos_state/src/mesos_state_client.erl"},{line,157}]},{mesos_state_client,frameworks,4,[{file,"/pkg/src/minuteman/_build/default/lib/mesos_state/src/mesos_state_client.erl"},{line,147}]},{mesos_state_client,tasks,1,[{file,"/pkg/src/minuteman/_build/default/lib/mesos_state/src/mesos_state_client.erl"},{line,135}]}]}
Jun 30 13:13:16 a1.dcos env[5570]: 13:13:16.910 [error] Failed to parse task: {function_clause,[{mesos_state_client,container,[#{type => <<"MESOS">>}],[{file,"/pkg/src/minuteman/_build/default/lib/mesos_state/src/mesos_state_client.erl"},{line,258}]},{mesos_state_client,task,3,[{file,"/pkg/src/minuteman/_build/default/lib/mesos_state/src/mesos_state_client.erl"},{line,198}]},{mesos_state_client,tasks,5,[{file,"/pkg/src/minuteman/_build/default/lib/mesos_state/src/mesos_state_client.erl"},{line,177}]},{mesos_state_client,executors,5,[{file,"/pkg/src/minuteman/_build/default/lib/mesos_state/src/mesos_state_client.erl"},{line,157}]},{mesos_state_client,frameworks,4,[{file,"/pkg/src/minuteman/_build/default/lib/mesos_state/src/mesos_state_client.erl"},{line,147}]},{mesos_state_client,tasks,1,[{file,"/pkg/src/minuteman/_build/default/lib/mesos_state/src/mesos_state_client.erl"},{line,135}]},{minuteman_mesos_poller,collect_vips,2,[{file,"/pkg/src/minuteman/_build/prod/lib/minuteman/src/minuteman_mesos_poller.erl"},{line,323}]},{minuteman_mesos_poller,handle_poll_state,2,[{file,"/pkg/src/minuteman/_build/prod/lib/minuteman/src/minuteman_mesos_poller.erl"},{line,231}]}]}
Jun 30 13:13:16 a1.dcos env[5570]: 13:13:16.910 [error] Failed to parse task: {function_clause,[{mesos_state_client,docker,[#{image => <<"calico/node-libnetwork:v0.8.0">>,network => <<"HOST">>,privileged => true}],[{file,"/pkg/src/minuteman/_build/default/lib/mesos_state/src/mesos_state_client.erl"},{line,270}]},{mesos_state_client,container,1,[{file,"/pkg/src/minuteman/_build/default/lib/mesos_state/src/mesos_state_client.erl"},{line,261}]},{mesos_state_client,task,3,[{file,"/pkg/src/minuteman/_build/default/lib/mesos_state/src/mesos_state_client.erl"},{line,198}]},{mesos_state_client,tasks,5,[{file,"/pkg/src/minuteman/_build/default/lib/mesos_state/src/mesos_state_client.erl"},{line,177}]},{mesos_state_client,executors,5,[{file,"/pkg/src/minuteman/_build/default/lib/mesos_state/src/mesos_state_client.erl"},{line,157}]},{mesos_state_client,frameworks,4,[{file,"/pkg/src/minuteman/_build/default/lib/mesos_state/src/mesos_state_client.erl"},{line,147}]},{mesos_state_client,tasks,1,[{file,"/pkg/src/minuteman/_build/default/lib/mesos_state/src/mesos_state_client.erl"},{line,135}]},{minuteman_mesos_poller,collect_vips,2,[{file,"/pkg/src/minuteman/_build/prod/lib/minuteman/src/minuteman_mesos_poller.erl"},{line,323}]}]}
```

Assignee

Sargun Dhillon

Labels

None

Components

Configure