{"action":"created","issue":{"url":"https://api.github.com/repos/mesosphere/marathon/issues/3636","repository_url":"https://api.github.com/repos/mesosphere/marathon","labels_url":"https://api.github.com/repos/mesosphere/marathon/issues/3636/labels{/name}","comments_url":"https://api.github.com/repos/mesosphere/marathon/issues/3636/comments","events_url":"https://api.github.com/repos/mesosphere/marathon/issues/3636/events","html_url":"https://github.com/mesosphere/marathon/issues/3636","id":145307047,"number":3636,"title":"Apps Specifiying a Discovery Port aren't auto-allocated a Service Port","user":{"login":"djosborne","id":3444362,"avatar_url":"https://avatars.githubusercontent.com/u/3444362?v=3","gravatar_id":"","url":"https://api.github.com/users/djosborne","html_url":"https://github.com/djosborne","followers_url":"https://api.github.com/users/djosborne/followers","following_url":"https://api.github.com/users/djosborne/following{/other_user}","gists_url":"https://api.github.com/users/djosborne/gists{/gist_id}","starred_url":"https://api.github.com/users/djosborne/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djosborne/subscriptions","organizations_url":"https://api.github.com/users/djosborne/orgs","repos_url":"https://api.github.com/users/djosborne/repos","events_url":"https://api.github.com/users/djosborne/events{/privacy}","received_events_url":"https://api.github.com/users/djosborne/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mesosphere/marathon/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/mesosphere/marathon/labels/service","name":"service","color":"eb6420"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/mesosphere/marathon/milestones/12","html_url":"https://github.com/mesosphere/marathon/milestones/Backlog","labels_url":"https://api.github.com/repos/mesosphere/marathon/milestones/12/labels","id":870039,"number":12,"title":"Backlog","description":"","creator":{"login":"ConnorDoyle","id":379372,"avatar_url":"https://avatars.githubusercontent.com/u/379372?v=3","gravatar_id":"","url":"https://api.github.com/users/ConnorDoyle","html_url":"https://github.com/ConnorDoyle","followers_url":"https://api.github.com/users/ConnorDoyle/followers","following_url":"https://api.github.com/users/ConnorDoyle/following{/other_user}","gists_url":"https://api.github.com/users/ConnorDoyle/gists{/gist_id}","starred_url":"https://api.github.com/users/ConnorDoyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ConnorDoyle/subscriptions","organizations_url":"https://api.github.com/users/ConnorDoyle/orgs","repos_url":"https://api.github.com/users/ConnorDoyle/repos","events_url":"https://api.github.com/users/ConnorDoyle/events{/privacy}","received_events_url":"https://api.github.com/users/ConnorDoyle/received_events","type":"User","site_admin":false},"open_issues":253,"closed_issues":70,"state":"open","created_at":"2014-11-17T19:11:38Z","updated_at":"2016-04-15T14:01:50Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2016-04-01T23:12:53Z","updated_at":"2016-04-18T03:59:42Z","closed_at":null,"body":"I'm launching two near-identical applications, one includes the \"ipAddress\" field as shown below, the other does not. They are both specifiying VHOSTS. \r\n\r\nThe one that **does not** specify the ipAddress field **is** assigned a servicePort.\r\nThe one that **does** specify the ipAddress field **is not** assigned a servicePort.\r\n\r\nIs there any reason for this difference in behavior? If an app is using IP-per-container and specifies a VHOST, I believe it should still receive a serviceport to map to on the load balancer.\r\n\r\n```\r\n{\r\n  \"id\": \"calico-2\",\r\n  \"ipAddress\": {\r\n    \"discovery\": {\r\n      \"ports\": [{ \"number\": 80, \"name\": \"http\", \"protocol\": \"tcp\" }]\r\n    }\r\n  },\r\n  \"container\": {\r\n    \"type\": \"DOCKER\",\r\n    \"docker\": {\r\n      \"network\": \"BRIDGE\",\r\n      \"image\": \"nginx\",\r\n      \"parameters\": [{\"key\": \"net\", \"value\": \"databases\"}]\r\n    }\r\n  },\r\n  \"instances\": 1,\r\n  \"cpus\": 0.1,\r\n  \"mem\": 65,\r\n  \"labels\":{\r\n    \"HAPROXY_GROUP\":\"external\",\r\n    \"HAPROXY_0_VHOST\": \"my.marathon.app\"\r\n  }\r\n}\r\n```"},"comment":{"url":"https://api.github.com/repos/mesosphere/marathon/issues/comments/211184001","html_url":"https://github.com/mesosphere/marathon/issues/3636#issuecomment-211184001","issue_url":"https://api.github.com/repos/mesosphere/marathon/issues/3636","id":211184001,"user":{"login":"robbrockbank","id":3227729,"avatar_url":"https://avatars.githubusercontent.com/u/3227729?v=3","gravatar_id":"","url":"https://api.github.com/users/robbrockbank","html_url":"https://github.com/robbrockbank","followers_url":"https://api.github.com/users/robbrockbank/followers","following_url":"https://api.github.com/users/robbrockbank/following{/other_user}","gists_url":"https://api.github.com/users/robbrockbank/gists{/gist_id}","starred_url":"https://api.github.com/users/robbrockbank/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robbrockbank/subscriptions","organizations_url":"https://api.github.com/users/robbrockbank/orgs","repos_url":"https://api.github.com/users/robbrockbank/repos","events_url":"https://api.github.com/users/robbrockbank/events{/privacy}","received_events_url":"https://api.github.com/users/robbrockbank/received_events","type":"User","site_admin":false},"created_at":"2016-04-18T03:59:42Z","updated_at":"2016-04-18T03:59:42Z","body":"With IP per task/container, we don't want a host port - the IP and port of the container is directly exposed and so there is no requirement for a host port.\r\n\r\nThe problem is that in the IP per container app data, Marathon does not return a Service Port - so the LB has to assign it's own service port - which isn't particularly sound - Marathon should really be the one responsible for Service port management, otherwise there are potential clashes between ports assigned by Marathon and Marathon-LB"}}