thefactory / marathon-python

Python client library for Mesos Marathon's REST API
MIT License
197 stars 193 forks source link

container.type = MESOS and networking, marathon 1.4.2 #186

Open newffy opened 7 years ago

newffy commented 7 years ago

when I'm creating app with

container: {
  type: "MESOS"
  docker: {
    image: "...." 
 }
}

and doesn't specify container.docker.network, marathon-python fills "network" with "HOST" value and marathon responds as

ERROR:marathon:Got HTTP 400: {"message":"Invalid JSON","details":[{"path":"/container/network","errors":["Mesos Containerizer does not support network"]}]}
protetore commented 7 years ago

Same here.

Not only MESOS container type doesn't support docker.network but also on newer versions of marathon you cannot specify container.docker.network when using networks (which is the default behavior now).

Maybe should avoid including this property on the object if not set on MarathonDockerContainer.

protetore commented 7 years ago

Just submitted a pull request to address this: #218