mesosphere / marathon

Deploy and manage containers (including Docker) on top of Apache Mesos at scale.
https://mesosphere.github.io/marathon/
Apache License 2.0
4.07k stars 845 forks source link

POST /v2/apps is broken in master #1171

Closed bobrik closed 9 years ago

bobrik commented 9 years ago

For new and old apps:

# curl -H "Content-type: application/json" -X POST http://web488:8080/v2/apps -d '{"container": {"docker": {"portMappings": [{"containerPort": 80, "servicePort": 14000}], "image": "docker.core.tf/topface-prod-app:20150210012", "network": "BRIDGE"}, "type": "DOCKER"}, "mem": 2048, "backoffSeconds": 5, "cmd": "/sbin/my_init", "cpus": 2.5, "ports": [14000], "instances": 1, "healthChecks": [{"gracePeriodSeconds": 5, "protocol": "TCP", "intervalSeconds": 5, "timeoutSeconds": 10, "maxConsecutiveFailures": 3}], "backoffFactor": 1.0, "id": "/totally/different/path", "constraints": [["hostname", "CLUSTER", "web33"]]}'
{"errors":[{"attribute":"id","error":"the empty path can't be used as id"}]}
[2015-02-10 15:29:08,111] INFO Upgrade id:/totally/different version:2015-02-10T15:29:08.030Z with force:false (mesosphere.marathon.state.GroupManager:123)
[2015-02-10 15:29:08,186] INFO 192.168.1.233 -  -  [10/Feb/2015:15:29:08 +0000] "POST /v2/apps HTTP/1.1" 422 76 "-" "curl/7.26.0" (mesosphere.chaos.http.ChaosRequestLog:15)
[2015-02-10 15:29:08,186] WARN Deployment failed for change: 2015-02-10T15:29:08.030Z (mesosphere.marathon.state.GroupManager:145)
javax.validation.ConstraintViolationException: Bean is not valid
    at mesosphere.marathon.api.BeanValidation$class.requireValid(BeanValidation.scala:75)
    at mesosphere.marathon.state.GroupManager.requireValid(GroupManager.scala:29)
    at mesosphere.marathon.state.GroupManager$$anonfun$2$$anonfun$apply$9.apply(GroupManager.scala:135)
    at mesosphere.marathon.state.GroupManager$$anonfun$2$$anonfun$apply$9.apply(GroupManager.scala:134)
    at scala.util.Success$$anonfun$map$1.apply(Try.scala:236)
    at scala.util.Try$.apply(Try.scala:191)
    at scala.util.Success.map(Try.scala:236)
    at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235)
    at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235)
    at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
drexin commented 9 years ago

Thanks, fixed in https://github.com/mesosphere/marathon/pull/1172