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

Including docker container information and a blank CMD field in an app JSON breaks PUT updates but not POST app creations #1630

Closed john-dodson closed 9 years ago

john-dodson commented 9 years ago

If include Docker container information in your JSON and "cmd": "", then using POST to create the app in Marathon will work, but using PUT to update it throws the error:

"AppDefinition must either contain one of 'cmd' or 'args', and/or a 'container'."

If you remove the "cmd": "" from the JSON the PUT update for the app works.

Marathon should behave identically in both cases when "cmd": "" is provided, either throwing an error in both cases or never throwing an error for that. I would argue that it should not throw the error like the current functionality of the POST command.

aquamatthias commented 9 years ago

Thanks @john-dodson for this report. I could reproduce this behavior. We have different data models for creation and update. Obviously the validation logic is not congruent.

kolloch commented 9 years ago

Hi @aquamatthias , isn't it a duplicated of https://github.com/mesosphere/marathon/issues/1446? Did you test on master?

aquamatthias commented 9 years ago

Duplicate of #1446 which is fixed in 0.9.0.