通过api调用marathon重启app后出现deployment,但是app不会重启,配置如下:

  "constraints": [
[
"hostname",
"UNIQUE"
],
[
"hostname",
"LIKE",
"HOST-00[12]"
]
]

指定app只能在2个服务器上启动,并且每个服务器只能启动1个instance,

解决方法如下:

  "upgradeStrategy": {
"maximumOverCapacity": 1,
"minimumHealthCapacity": 0.5
}

官方解释如下:

Marathon allows you to perform rolling restarts to deploy new versions of applications. In general, there are two phases to deploying a new version of an application: starting a set of processes with the new version and stopping the set of processes with the old version.

In Marathon, you can perform a rolling restart by defining an upgrade strategy with a minimumHealthCapacity at the application level.

The minimumHealthCapacity is a percentage which, when applied to the instance count, defines the number of healthy instances that a certain version of the application must have at all times during update. Number of healthy instances is rounded up (ceil).

  • minimumHealthCapacity == 0 : All old instances can be killed before the new version is deployed.
  • minimumHealthCapacity == 1 : All instances of the new version are deployed side by side before the old version is stopped.
  • minimumHealthCapacity between 0 and 1 : Scale the old version to minimumHealthCapacity and start the new version to minimumHealthCapacity side by side. If this is completed successfully, the new version is scaled to 100% and the old version is stopped. Number of healthy instances is rounded up (ceil). E.g. 3 instances and minimumHealthCapacity 0.7 gives us ⌈3 × 0.7⌉ = ⌈2.1⌉ = 3 so all instances will remain.

问题原因:minimumHealthCapacity默认为1,即只有新实例启动之后才会停止老实例,这与hostname:UNIQUE冲突了;

参考:

marathon constraints

https://mesosphere.github.io/marathon/docs/constraints.html

marathon app deployment

http://mesosphere.github.io/marathon/docs/deployments.html

【原创】大叔经验分享(81)marathon上app无法重启的更多相关文章

  1. 【原创】经验分享:一个小小emoji尽然牵扯出来这么多东西?

    前言 之前也分享过很多工作中踩坑的经验: 一个线上问题的思考:Eureka注册中心集群如何实现客户端请求负载及故障转移? [原创]经验分享:一个Content-Length引发的血案(almost.. ...

  2. 【原创】大叔经验分享(70)marathon重启app后一直处于waiting状态

    marathon重启app后一直处于waiting状态,查看marathon日志 # journalctl -u marathon -f 有如下日志: Jun 14 12:58:38 DataOne- ...

  3. 【原创】大叔经验分享(12)如何程序化kill提交到spark thrift上的sql

    spark 2.1.1 hive正在执行中的sql可以很容易的中止,因为可以从console输出中拿到当前在yarn上的application id,然后就可以kill任务, WARNING: Hiv ...

  4. 【原创】大叔经验分享(6)Oozie如何查看提交到Yarn上的任务日志

    通过oozie job id可以查看流程详细信息,命令如下: oozie job -info 0012077-180830142722522-oozie-hado-W 流程详细信息如下: Job ID ...

  5. 【原创】大叔经验分享(2)为什么hive在大表上加条件后执行limit很慢

    问题重现 select id from big_table where name = 'sdlkfjalksdjfla' limit 100; 首先看执行计划: hive> explain se ...

  6. 【原创】大叔经验分享(1)在yarn上查看hive完整执行sql

    hive执行sql提交到yarn上的任务名字是被处理过的,通常只能显示sql的前边一段和最后几个字符,这样就会带来一些问题: 1)相近时间提交了几个相近的sql,相互之间无法区分: 2)一个任务有问题 ...

  7. 【原创】大叔经验分享(87)marathon重启应用过程服务不可用

    marathon提供多种健康检查方式 常用的有TCP和HTTP, TCP检查端口是否存在,存在则认为实例健康: HTTP检查指定URL的HTTP返回码,返回码正常(2xx.3xx)则认为实例健康: 这 ...

  8. 【原创】大叔经验分享(11)python引入模块报错ImportError: No module named pandas numpy

    python应用通常需要一些库,比如numpy.pandas等,安装也很简单,直接通过pip # pip install numpyRequirement already satisfied: num ...

  9. 【原创】大叔经验分享(7)创建hive表时格式如何选择

    常用格式 textfile 需要定义分隔符,占用空间大,读写效率最低,非常容易发生冲突(分隔符)的一种格式,基本上只有需要导入数据的时候才会使用,比如导入csv文件: ROW FORMAT DELIM ...

随机推荐

  1. UML期末复习题——2.9:UML Deployment Diagram

    附加题:部署图 重要概念: 1. 部署图 部署图表示的是,如何将具体的软件制品(例如可执行文件)分配到计算节点(具有处理服务的某种事物)上.部署图表示了软件元素在物理架构上的部署,以及物理元素之间的通 ...

  2. iOS获取应用当前Caches目录路径以及当前日期

    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); NSSt ...

  3. 阶段5 3.微服务项目【学成在线】_day03 CMS页面管理开发_09-修改页面-服务端-接口开发

    需要写两个接口 api的接口内定义两个方法.修改的地方单独传了id @ApiOperation("根据页面id查询页面信息") public CmsPage findById(St ...

  4. MobileNet V2深入理解

    转载:https://zhuanlan.zhihu.com/p/33075914 MobileNet V2 论文初读 转载:https://blog.csdn.net/wfei101/article/ ...

  5. Go 微服务架构Micro相关概念理解

    Micro是一个微服务框架(或者说是工具集):提供了各类组件,解决微服务架构中的不同问题,服务监控.服务发现.熔断机制,负载均衡等等,自己一个个解决这些问题几乎不可能,这时候就需要借助go-micro ...

  6. Node.js使用superagent模拟GET/POST请求样例

    示例代码: var superagent = require('superagent'); superagent.get("http://localhost:8091/user/all?re ...

  7. 建立自己的数据类型——C结构体归纳

    一.建立结构体类型 1.申明结构体类型 struct 结构体名 { 成员表列(类型名 成员名:); }: 例如: struct Person { char name; int age; char se ...

  8. 【并行计算-CUDA开发】英伟达硬件解码器分析

    这篇文章主要分析 NVCUVID 提供的解码器,里面提到的所有的源文件都可以在英伟达的 nvenc_sdk 中找到. 解码器的代码分析 SDK 中的 sample 文件夹下的 NvTranscoder ...

  9. openssl交叉编译

    目录 openssl交叉编译 title: openssl交叉编译 date: 2019/12/18 21:09:33 toc: true --- openssl交叉编译 tar xvf openss ...

  10. prometheus 监控 redis + rabbitmq

    1.安装部署 1.1 wget https://github.com/oliver006/redis_exporter/releases/download/v0.15.0/redis_exporter ...