1

testing Marathon application/group deployment I have observed that if I try to deploy an application specifying a service port that has already been assigned to another app Marathon v2/apps endpoint rejects the request, as expected:

{"message”:"Requested service port 8306 conflicts with a service port in app /dbaas01/mysql"}

Yet, it seems that the service port uniqueness is not checked when submitting the deployment of an application group. I was able to deploy twice the same application group (changing the root group name) and using the same service ports for the applications. Of course, this creates an issue with the haproxy-marathon-bridge: the load balancer configuration is modified so that the same port points to different services:

listen dbaas01_mysql-8306
  bind 0.0.0.0:8306
  mode tcp
  option tcplog
  balance leastconn
  server dbaas01_mysql-1 172.30.15.84:31841 check 

listen dbaas02_mysql-8306
  bind 0.0.0.0:8306
  mode tcp
  option tcplog
  balance leastconn
  server dbaas02_mysql-1 172.30.15.85:31075 check

Is this the expected behavior? Why the check on the service port uniqueness is not performed on the application deployed using the /v2/groups endpoint?

Thank you in advance for feedbacks. Best regards,

Marica

  • Can you attach requests you sent to marathon? – janisz Jan 08 '16 at 22:45
  • I'm using this application group definition [file](https://github.com/indigo-dc/marathon/blob/master/examples/phpmyadmin-appgroup.json) and calling Marathon REST API: curl -X POST http://marathon-host:8080/v2/groups -d @phpmyadmin-appgroup.json -H "Content-type: application/json". If I change the group id "dbaas" (e.g. "dbaas02") then Marathon does not notify me about the same ports being used by different applications... – Marica Antonacci Jan 09 '16 at 09:05
  • I did small investigation and I think it's bug. [`checkAppConflicts()`](https://github.com/mesosphere/marathon/blob/a84785f7f76bf682a37f9c0a4cfb1386e2b402ad/src/main/scala/mesosphere/marathon/api/v2/ModelValidation.scala#L294-L298) is used only with apps requests not groups. I've prepared [fix](https://github.com/mesosphere/marathon/pull/2941) – janisz Jan 09 '16 at 19:47
  • 1
    @janisz Thank you very much for your feedback. I have seen your patch..hope it will be merged soon! – Marica Antonacci Jan 10 '16 at 20:43
  • @janisz Hello! Any news about the patch? – Marica Antonacci Feb 11 '16 at 21:24
  • I'm sorry I haven't got time to work on this issue. In new release there is validation change so maybe it's already fixed. – janisz Feb 11 '16 at 22:10
  • Thank you for your reply. I'll test the new release asap and see if this is fixed.. – Marica Antonacci Feb 12 '16 at 08:08

0 Answers0