中观奴隶拒绝所有的马拉松式的工作,持续不断的工作量;声称没有可用空间

snz8szmq  于 2021-06-26  发布在  Mesos
关注(0)|答案(2)|浏览(300)

我正在尝试使用对mesos的持久卷支持,并且要让它工作起来非常困难。
我已按如下方式配置了每个从属服务器,并确认它们已使用此新配置成功重新启动:
/etc/mesos slave/资源

[    ​
  {
    "name" : "disk",
    "type" : "SCALAR",
    "scalar" : { "value" : 4194304 },
    "disk" : {
      "source" : {
        "type" : "PATH",
        "path" : { "root" : "/mnt/disk1" }
      }
    }
  },
  {
    "name" : "disk",
    "type" : "SCALAR",
    "scalar" : { "value" : 4194304 },
    "disk" : {
      "source" : {
        "type" : "PATH",
        "path" : { "root" : "/mnt/disk2" }
      }
    }
  },
  {
    "name" : "disk",
    "type" : "SCALAR",
    "scalar" : { "value" : 4194304 },
    "disk" : {
      "source" : {
        "type" : "PATH",
        "path" : { "root" : "/mnt/disk3" }
      }
    }
  },
  {
    "name" : "disk",
    "type" : "SCALAR",
    "scalar" : { "value" : 4194304 },
    "disk" : {
      "source" : {
        "type" : "PATH",
        "path" : { "root" : "/mnt/disk4" }
      }
    }
  },
  {
    "name" : "disk",
    "type" : "SCALAR",
    "scalar" : { "value" : 4194304 },
    "disk" : {
      "source" : {
        "type" : "PATH",
        "path" : { "root" : "/mnt/disk5" }
      }
    }
  },
  {
    "name" : "disk",
    "type" : "SCALAR",
    "scalar" : { "value" : 4194304 },
    "disk" : {
      "source" : {
        "type" : "MOUNT",
        "mount" : { "root" : "/mnt/disk6" }
      }
    }
  },
  {
    "name" : "disk",
    "type" : "SCALAR",
    "scalar" : { "value" : 4194304 },
    "disk" : {
      "source" : {
        "type" : "MOUNT",
        "mount" : { "root" : "/mnt/disk7" }
      }
    }
  }
]

具体来说,这表明我拥有无保留的资源。具体地说(这里有完整的回答):

{
  ...
  "slaves": [{
    "id": "c5e59876-5157-463f-b31e-16b34d6ffc72-S8",
    "pid": "slave(1)@172.30.31.55:5051",
    "hostname": "redacted47.redacted.com",
    "registered_time": 1458810586.61153,
    "resources": {
      "cpus": 32,
      "disk": 29360128,
      "mem": 256651,
      "ports": "[31000-32000]"
    },
    "used_resources": {
      "cpus": 1,
      "disk": 0,
      "mem": 128,
      "ports": "[31282-31282]"
    },
    "offered_resources": {
      "cpus": 0,
      "disk": 0,
      "mem": 0
    },
    "reserved_resources": {},
    "unreserved_resources": {
      "cpus": 32,
      "disk": 29360128,
      "mem": 256651,
      "ports": "[31000-32000]"
    },

每当我尝试向它提交请求持久卷的作业时,所有从属服务器都会拒绝它,声称没有可用的磁盘资源:

Mar 26 17:59:43 redacted47.redacted.com start[30457]: [2016-03-26 17:59:43,606] INFO Offer [2220b6bf-aac2-402b-82e6-8d625284d1a4-O9375]. Considering unreserved resources with roles {*}. Not all basic resources satisfied: cpus SATISFIED (1.0 <= 1.0), mem SATISFIED (128.0 <= 128.0), disk including volumes NOT SATISFIED (1024.0 > 0.0) (mesosphere.mesos.ResourceMatcher$:marathon-akka.actor.default-dispatcher-38)
Mar 26 17:59:43 redacted47.redacted.com start[30457]: [2016-03-26 17:59:43,606] INFO Offer [2220b6bf-aac2-402b-82e6-8d625284d1a4-O9376]. Considering unreserved resources with roles {*}. Not all basic resources satisfied: cpus SATISFIED (1.0 <= 1.0), mem SATISFIED (128.0 <= 128.0), disk including volumes NOT SATISFIED (1024.0 > 0.0) (mesosphere.mesos.ResourceMatcher$:marathon-akka.actor.default-dispatcher-38)
Mar 26 17:59:43 redacted47.redacted.com start[30457]: [2016-03-26 17:59:43,606] INFO Finished processing 2220b6bf-aac2-402b-82e6-8d625284d1a4-O9375. Matched 0 ops after 1 passes. disk(*) 4194304.0; disk(*) 4194304.0; disk(*) 4194304.0; disk(*) 4194304.0; disk(*) 4194304.0; disk(*) 4194304.0; disk(*) 4194304.0; cpus(*) 28.0; mem(*) 226955.0; ports(*) 31000->31085,31087->31364,31366->31940,31942->32000 left. (mesosphere.marathon.core.matcher.manager.impl.OfferMatcherManagerActor:marathon-akka.actor.default-dispatcher-11)
Mar 26 17:59:43 redacted47.redacted.com start[30457]: [2016-03-26 17:59:43,606] INFO Offer [2220b6bf-aac2-402b-82e6-8d625284d1a4-O9379]. Considering unreserved resources with roles {*}. Not all basic resources satisfied: cpus SATISFIED (1.0 <= 1.0), mem SATISFIED (128.0 <= 128.0), disk including volumes NOT SATISFIED (1024.0 > 0.0) (mesosphere.mesos.ResourceMatcher$:marathon-akka.actor.default-dispatcher-38)

如果我试图发布一个直接针对mesos主机创建卷的请求,那么它会拒绝该请求,并说“磁盘资源不足”,如下所示:


# curl -v -i \

    -u "marathon:$(cat /etc/marathon/.secret)" \
    -d slaveId=c5e59876-5157-463f-b31e-16b34d6ffc72-S8 \
    -d volumes='[
      {
        "name": "disk",
        "type": "SCALAR",
        "scalar": { "value": 512 },
        "role": "foo",
        "reservation": {
          "principal": "marathon"
        },
        "disk": {
          "persistence": {
            "id" : "very-persist"
          },
          "volume": {
            "mode": "RW",
            "container_path": "such-path"
          }
        }
      }
    ]' \
    -X POST http://localhost:5050/master/create-volumes; echo

* About to connect() to localhost port 5050 (#0)
* Trying ::1...
* Connection refused
* Trying 127.0.0.1...
* Connected to localhost (127.0.0.1) port 5050 (#0)
* Server auth using Basic with user 'marathon'

> POST /master/create-volumes HTTP/1.1
> Authorization: Basic redacted
> User-Agent: curl/7.29.0
> Host: localhost:5050
> Accept: */*
> Content-Length: 481
> Content-Type: application/x-www-form-urlencoded
>

* upload completely sent off: 481 out of 481 bytes

< HTTP/1.1 409 Conflict
HTTP/1.1 409 Conflict
< Date: Thu, 24 Mar 2016 09:50:36 GMT
Date: Thu, 24 Mar 2016 09:50:36 GMT
< Content-Length: 53
Content-Length: 53
​
<

* Connection #0 to host localhost left intact

Invalid CREATE Operation: Insufficient disk resources

我束手无策。我不知道我在做什么,我正在尽我最大的努力遵循文件。任何关于我可能做错了什么的暗示都将非常感激。
我在跑步:
中观 0.28.0 马拉松赛跑 1.0.0RC1 我将尽可能地遵循以下资源中的说明:
https://mesosphere.github.io/marathon/docs/persistent-volumes.html
http://mesos.apache.org/documentation/latest/persistent-volume/
http://mesos.apache.org/documentation/latest/multiple-disk/
谢谢你的阅读!

u4vypkhs

u4vypkhs1#

抱歉,我无法添加评论。
我觉得文件有点吓人。它是详细的,它很多,但我正在努力学习中观,马拉松等在我自己的时间,没有例子是真的很难为我。我更喜欢的是在一个页面上显示一个小集群,其中包含ip地址、磁盘、cpu以及设置主机、代理和zookeeper集合所需的配置文件。一些示例json文件展示了如何在特定用例中使用marathon。
我的目标是在我的公共github帐户中为自己做一些注解,显示我的测试集群,并解释在持久卷工作时如何配置所有内容,jenkins和私有docker注册表都在mesos中,但我离这还很远。

fykwrbwg

fykwrbwg2#

首先感谢你提供了这样一个很好的文件问题!
你的问题似乎是:
a) 没有可用的根磁盘资源。一旦您手动指定了磁盘资源,mesos将自动停止检测根磁盘。您可以简单地添加一个根磁盘资源,如本文所述,这将解决您的问题。
b) 上面的“createvolume”http请求将只考虑根磁盘资源(由于上面解释的原因,您没有根磁盘资源)。如果您想使用非根磁盘,您应该考虑这里非常简短地提到的source字段。
顺便说一句,任何关于如何改进文档的反馈都是受欢迎的(我将添加一个关于这个问题的简短说明,但是用户的任何反馈都是非常有用的)!请随意贡献!
希望这有帮助!

相关问题