[ 
https://issues.apache.org/jira/browse/MESOS-8146?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16240756#comment-16240756
 ] 

Joseph Wu commented on MESOS-8146:
----------------------------------

One important thing to note is that specifying arbitrary parameters to the 
DockerContainerizer is not guaranteed to work:
https://github.com/apache/mesos/blob/1.4.x/include/mesos/mesos.proto#L2850-L2854

The error here probably comes from a conflict between the underlying resource 
isolation.  Under the covers, Mesos can resize the container's cpu/memory.  The 
extra parameters you specify breaks the assumption Mesos is making (about how 
Docker works).

> Mesos agent fails containers on restart if containers were started with 
> memory-swap less than memory + 64mb
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: MESOS-8146
>                 URL: https://issues.apache.org/jira/browse/MESOS-8146
>             Project: Mesos
>          Issue Type: Bug
>          Components: agent
>    Affects Versions: 1.4.0
>         Environment: Mesos 1.4.0
> Redhat 7.4
> Marathon 1.4.8
> docker 1.12.6 
> docker api 1.24
>            Reporter: Guchakov Nikita
>
> I'd have some strange behaviour with Mesos when trying to disable swap on 
> docker containers. Our mesos version in use is 1.4.0
> When marathon deploys containers with
> ```
> "parameters": [
>         {
>           "key": "memory",
>           "value": "1024m"
>         },
>         {
>           "key": "memory-swap",
>           "value": "1024m"
>         }
>       ]
> ```
> then it deploys successfully. BUT when mesos-slave restarts and tries to 
> deregister executor it fails:
> ```E1027 11:11:47.367416 12626 slave.cpp:4287] Failed to update resources for 
> container 6e3e07af-db09-4dc0-88f8-4e5599529cbe of executor 
> 'templates-api.d72549fd-baed-11e7-9742-96b37b4eca54' of framework 
> 20171020-202151-141892780-5050-1-0001, destroying container: Failed to set 
> 'memory.limit_in_bytes': Invalid argument
> ```
> Things goes more weird when I tried different memory-swap configurations:
> Containers doesn't destroyed on slave's restart only when memory-swap >= 
> memory + 64mb.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to