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

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

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

  1. [
  2. {
  3. "name" : "disk",
  4. "type" : "SCALAR",
  5. "scalar" : { "value" : 4194304 },
  6. "disk" : {
  7. "source" : {
  8. "type" : "PATH",
  9. "path" : { "root" : "/mnt/disk1" }
  10. }
  11. }
  12. },
  13. {
  14. "name" : "disk",
  15. "type" : "SCALAR",
  16. "scalar" : { "value" : 4194304 },
  17. "disk" : {
  18. "source" : {
  19. "type" : "PATH",
  20. "path" : { "root" : "/mnt/disk2" }
  21. }
  22. }
  23. },
  24. {
  25. "name" : "disk",
  26. "type" : "SCALAR",
  27. "scalar" : { "value" : 4194304 },
  28. "disk" : {
  29. "source" : {
  30. "type" : "PATH",
  31. "path" : { "root" : "/mnt/disk3" }
  32. }
  33. }
  34. },
  35. {
  36. "name" : "disk",
  37. "type" : "SCALAR",
  38. "scalar" : { "value" : 4194304 },
  39. "disk" : {
  40. "source" : {
  41. "type" : "PATH",
  42. "path" : { "root" : "/mnt/disk4" }
  43. }
  44. }
  45. },
  46. {
  47. "name" : "disk",
  48. "type" : "SCALAR",
  49. "scalar" : { "value" : 4194304 },
  50. "disk" : {
  51. "source" : {
  52. "type" : "PATH",
  53. "path" : { "root" : "/mnt/disk5" }
  54. }
  55. }
  56. },
  57. {
  58. "name" : "disk",
  59. "type" : "SCALAR",
  60. "scalar" : { "value" : 4194304 },
  61. "disk" : {
  62. "source" : {
  63. "type" : "MOUNT",
  64. "mount" : { "root" : "/mnt/disk6" }
  65. }
  66. }
  67. },
  68. {
  69. "name" : "disk",
  70. "type" : "SCALAR",
  71. "scalar" : { "value" : 4194304 },
  72. "disk" : {
  73. "source" : {
  74. "type" : "MOUNT",
  75. "mount" : { "root" : "/mnt/disk7" }
  76. }
  77. }
  78. }
  79. ]

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

  1. {
  2. ...
  3. "slaves": [{
  4. "id": "c5e59876-5157-463f-b31e-16b34d6ffc72-S8",
  5. "pid": "slave(1)@172.30.31.55:5051",
  6. "hostname": "redacted47.redacted.com",
  7. "registered_time": 1458810586.61153,
  8. "resources": {
  9. "cpus": 32,
  10. "disk": 29360128,
  11. "mem": 256651,
  12. "ports": "[31000-32000]"
  13. },
  14. "used_resources": {
  15. "cpus": 1,
  16. "disk": 0,
  17. "mem": 128,
  18. "ports": "[31282-31282]"
  19. },
  20. "offered_resources": {
  21. "cpus": 0,
  22. "disk": 0,
  23. "mem": 0
  24. },
  25. "reserved_resources": {},
  26. "unreserved_resources": {
  27. "cpus": 32,
  28. "disk": 29360128,
  29. "mem": 256651,
  30. "ports": "[31000-32000]"
  31. },

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

  1. 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)
  2. 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)
  3. 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)
  4. 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主机创建卷的请求,那么它会拒绝该请求,并说“磁盘资源不足”,如下所示:

  1. # curl -v -i \
  2. -u "marathon:$(cat /etc/marathon/.secret)" \
  3. -d slaveId=c5e59876-5157-463f-b31e-16b34d6ffc72-S8 \
  4. -d volumes='[
  5. {
  6. "name": "disk",
  7. "type": "SCALAR",
  8. "scalar": { "value": 512 },
  9. "role": "foo",
  10. "reservation": {
  11. "principal": "marathon"
  12. },
  13. "disk": {
  14. "persistence": {
  15. "id" : "very-persist"
  16. },
  17. "volume": {
  18. "mode": "RW",
  19. "container_path": "such-path"
  20. }
  21. }
  22. }
  23. ]' \
  24. -X POST http://localhost:5050/master/create-volumes; echo
  25. * About to connect() to localhost port 5050 (#0)
  26. * Trying ::1...
  27. * Connection refused
  28. * Trying 127.0.0.1...
  29. * Connected to localhost (127.0.0.1) port 5050 (#0)
  30. * Server auth using Basic with user 'marathon'
  31. > POST /master/create-volumes HTTP/1.1
  32. > Authorization: Basic redacted
  33. > User-Agent: curl/7.29.0
  34. > Host: localhost:5050
  35. > Accept: */*
  36. > Content-Length: 481
  37. > Content-Type: application/x-www-form-urlencoded
  38. >
  39. * upload completely sent off: 481 out of 481 bytes
  40. < HTTP/1.1 409 Conflict
  41. HTTP/1.1 409 Conflict
  42. < Date: Thu, 24 Mar 2016 09:50:36 GMT
  43. Date: Thu, 24 Mar 2016 09:50:36 GMT
  44. < Content-Length: 53
  45. Content-Length: 53
  46. <
  47. * Connection #0 to host localhost left intact
  48. 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字段。
顺便说一句,任何关于如何改进文档的反馈都是受欢迎的(我将添加一个关于这个问题的简短说明,但是用户的任何反馈都是非常有用的)!请随意贡献!
希望这有帮助!

相关问题