how to auto launch new task instance when mesos-slave stopped?

假装没事ソ 提交于 2019-12-08 06:20:43

问题


    • 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'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'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. operation

    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)

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)


回答1:


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.



来源:https://stackoverflow.com/questions/44113232/how-to-auto-launch-new-task-instance-when-mesos-slave-stopped

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!