how to auto launch new task instance when mesos-sl

2019-06-02 03:03发布

    • 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) piciture1:initial task state
    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) picture3:task state after reboot machine

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条回答
冷血范
2楼-- · 2019-06-02 03:43

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.

查看更多
登录 后发表回答