mesos-slave停止时如何自动启动新任务实例? [英] how to auto launch new task instance when mesos-slave stopped?

查看:270
本文介绍了mesos-slave停止时如何自动启动新任务实例?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

    • 版本信息和命令行参数

    • version Info and command line args

mesos-master & mesos-slave version 1.1.0
marathon version 1.4.3
docker server version 1.28

  • mesos-master的命令行参数:

  • mesos-master's command line args:

    --zk=zk://ip1:2181,ip2:2181,ip3:2181/mesos \
    --port=5050 \
    --log_dir=/var/log/mesos \
    --hostname=ip1 \
    --quorum=2 \
    --work_dir=/var/lib/mesosmaster
    

  • mesos-slave的命令行参数:

  • mesos-slave's command line args:

    --master=zk://ip1:2181,ip2:2181,ip3:2181/mesos \
    --log_dir=/var/log/mesos --containerizers=docker,mesos \
    --executor_registration_timeout=10mins --hostname=ip1 \
    --recovery_timeout=1mins \
    --resources=ports:[25000-65000] \
    --work_dir=/var/lib/mesos  
    

  • 操作

    1. 在马拉松Web UI中,通过docker image运行应用程序,任务状态为未知". (因为我没有添加健康检查)
    2. 重新引导运行任务的计算机.
    3. 现在,我以为的预期结果是该任务将被杀死,而马拉松将创建一个新任务,但是现在(见下图)
    1. In marathon web UI,run a app via docker image,and task state is "Unknown". (Because I doesn't add health check)
    2. reboot the machine which runs the task.
    3. Now,the expected result what I thought is that the task will be killed and marathon will create a new task,but now (see below picture)

    任务状态变为计划外".大约15分钟后才能杀死任务. 最后,我想要的是新任务将自动启动,而旧任务将被自动杀死(或删除或删除)

    The State of Task became "Unscheduled". the the task can not be killed only after about 15mins. Finally,what I want is the new task will auto launch and the old task auto be killed ( or removed or expunged)

    推荐答案

    似乎您需要为任务配置unreachableStrategy.指南此处对其进行了解释.我将很快使用它,因此也将在此处发布示例.

    It seems like you need to configure unreachableStrategy for your tasks. The guide here explains it. I will be playing with it soon so will post an example here as well.

    这篇关于mesos-slave停止时如何自动启动新任务实例?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆