You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Joseph Wu (JIRA)" <ji...@apache.org> on 2016/10/10 17:28:21 UTC

[jira] [Commented] (MESOS-6351) --log-opt parameter not passed through to docker correctly

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

Joseph Wu commented on MESOS-6351:
----------------------------------

Note:
All arbitrary parameters that are given to the DockerContainerizer are formatted in the same way:
https://github.com/apache/mesos/blob/ba9adeebdd9283eeec18186818bd4de4c2b28a88/src/docker/docker.cpp#L697-L699
{code}
  foreach (const Parameter& parameter, dockerInfo.parameters()) {
    argv.push_back("--" + parameter.key() + "=" + parameter.value());
  }
{code}

> --log-opt parameter not passed through to docker correctly
> ----------------------------------------------------------
>
>                 Key: MESOS-6351
>                 URL: https://issues.apache.org/jira/browse/MESOS-6351
>             Project: Mesos
>          Issue Type: Bug
>          Components: docker
>            Reporter: Andrew Jefferson
>
> discovered when using marathon. see: https://github.com/mesosphere/marathon/issues/4345
> setting docker paramters 
> {key: "log-opt", value: "max-size=1m"}
> produces the following command
> --log-opt=max-size=1m
> which doesnt seem to restrict the log file size, although no errors are thrown.
> in the docker docs https://docs.docker.com/engine/admin/logging/overview/ it seems that they don't use --log-opt=foo=bar rather they use --log-opt foo=bar - I'm not sure if this is the cause or not but it could be.
> I don't know if this is really a marathon bug or a docker bug but if someone else wants to look into it, something fishy is definitely going on.
> docker -H unix:///var/run/docker.sock run --cpu-shares 1024 --memory 2097152000 -e MARATHON_APP_VERSION=2016-09-09T17:58:45.534Z -e HOST=10.0.2.49 -e MARATHON_APP_RESOURCE_CPUS=1.0 -e MARATHON_APP_DOCKER_IMAGE=tractableio/node-kafka-consumer:full-frontal -e NODE_ENV=development -e PORT_10001=26242 -e MESOS_TASK_ID=node-kafka-consumer-dev.0dd9d0f3-76b7-11e6-8bb6-fe0768a57502 -e PORT=26242 -e MARATHON_APP_RESOURCE_MEM=2000.0 -e PORTS=26242 -e MARATHON_APP_RESOURCE_DISK=0.0 -e MARATHON_APP_LABELS= -e MARATHON_APP_ID=/node-kafka-consumer-dev -e PORT0=26242 -e LIBPROCESS_IP=10.0.2.49 -e MESOS_SANDBOX=/mnt/mesos/sandbox -e MESOS_CONTAINER_NAME=mesos-97ba2d5b-4e46-4a8f-ac61-2283fc78c68f-S17.1c6f7865-fd37-4bf5-84c8-f4b4442cde45 -v /var/lib/mesos/slave/slaves/97ba2d5b-4e46-4a8f-ac61-2283fc78c68f-S17/frameworks/97ba2d5b-4e46-4a8f-ac61-2283fc78c68f-0000/executors/node-kafka-consumer-dev.0dd9d0f3-76b7-11e6-8bb6-fe0768a57502/runs/1c6f7865-fd37-4bf5-84c8-f4b4442cde45:/mnt/mesos/sandbox --net host --log-opt=max-size=1m --name mesos-97ba2d5b-4e46-4a8f-ac61-2283fc78c68f-S17.1c6f7865-fd37-4bf5-84c8-f4b4442cde45 tractableio/node-kafka-consumer:full-frontal 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)