You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Lei Xu (JIRA)" <ji...@apache.org> on 2016/08/08 09:13:20 UTC

[jira] [Commented] (MESOS-3325) Running mesos-slave@0.23 in a container causes slave to be lost after a restart

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

Lei Xu commented on MESOS-3325:
-------------------------------

Hi, We hit this issue months ago, mesos agent always read boot_id from host os and re-generate the slave id and register with master, I remember here is a issue to track this, but I forget the issue id, you can give a boot id to the agent to make sure the slave id do not change when restart.

> Running mesos-slave@0.23 in a container causes slave to be lost after a restart
> -------------------------------------------------------------------------------
>
>                 Key: MESOS-3325
>                 URL: https://issues.apache.org/jira/browse/MESOS-3325
>             Project: Mesos
>          Issue Type: Bug
>          Components: slave
>    Affects Versions: 0.23.0
>         Environment: CoreOS, Container, Docker
>            Reporter: Chris Fortier
>            Priority: Critical
>
> We are attempting to run mesos-slave 0.23 in a container. However it appears that the mesos-slave agent registers as a new slave instead of re-registering. This causes the formerly-launched tasks to continue running.
> systemd unit being used:
> ```
> [Unit]
> Description=MesosSlave
> After=docker.service dockercfg.service
> Requires=docker.service dockercfg.service
> [Service]
> Environment=MESOS_IMAGE=mesosphere/mesos-slave:0.23.0-1.0.ubuntu1404
> Environment=ZOOKEEPER=redacted
> User=core
> KillMode=process
> Restart=always
> RestartSec=20
> TimeoutStartSec=0
> ExecStartPre=-/usr/bin/docker kill mesos_slave
> ExecStartPre=-/usr/bin/docker rm mesos_slave
> ExecStartPre=/usr/bin/docker pull ${MESOS_IMAGE}
> ExecStart=/usr/bin/sh -c "sudo /usr/bin/docker run \
>     --name=mesos_slave \
>     --net=host \
>     --pid=host \
>     --privileged \
>     -v /home/core/.dockercfg:/root/.dockercfg:ro \
>     -v /sys:/sys \
>     -v /usr/bin/docker:/usr/bin/docker:ro \
>     -v /var/run/docker.sock:/var/run/docker.sock \
>     -v /lib64/libdevmapper.so.1.02:/lib/libdevmapper.so.1.02:ro \
>     -v /var/lib/mesos/slave:/var/lib/mesos/slave \
>     ${MESOS_IMAGE} \
>     --ip=`curl -s http://169.254.169.254/latest/meta-data/local-ipv4` \
>     --attributes=zone:$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone)\;os:coreos \
>     --containerizers=docker,mesos \
>     --executor_registration_timeout=10mins \
>     --hostname=`curl -s http://169.254.169.254/latest/meta-data/public-hostname` \
>     --log_dir=/var/log/mesos \
>     --master=zk://${ZOOKEEPER}/mesos \
>     --work_dir=/var/lib/mesos/slave"
> ExecStop=/usr/bin/docker stop mesos_slave
> [Install]
> WantedBy=multi-user.target
> [X-Fleet]
> Global=true
> MachineMetadata=role=worker
> ```
> ps, yes I saw the coreos-setup repo was deprecated.



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