1
我正在运行mesos + marathon集群,到目前为止一切正常。但我无法弄清楚如何在马拉松中使用约束。使用马拉松限制的问题
我已标记我mesos奴隶与属性
$ cat /etc/mesos-slave/attributes/category
SERVICE
的马拉松说明对我的容器,我添加
"constraints": [["category", "CLUSTER", "SERVICE"]]
但是当我部署我的容器,我只得到“信息的不匹配报价“我无法弄清楚我做错了什么。
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: [2015-06-30 08:08:48,812] INFO No matching offer for <CONTAINER> (need cpus=0.1, mem=3072.0, disk=0.0,
ports=List(0)) : id {
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: value: "20150616-090516-2130907308-5050-1304-O1291851"
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: }
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: framework_id {
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: value: "20150330-112621-2130907308-5050-25763-0000"
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: }
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: slave_id {
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: value: "20150616-090516-2130907308-5050-1304-S49"
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: }
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: hostname: "<HOSTNAME>"
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: resources {
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: name: "cpus"
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: type: SCALAR
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: scalar {
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: value: 0.3999999999999999
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: }
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: role: "*"
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: }
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: resources {
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: name: "mem"
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: type: SCALAR
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: scalar {
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: value: 4911.0
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: }
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: role: "*"
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: }
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: resources {
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: name: "disk"
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: type: SCALAR
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: scalar {
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: value: 14896.0
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: }
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: role: "*"
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: }
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: resources {
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: name: "ports"
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: type: RANGES
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: ranges {
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: range {
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: begin: 31003
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: end: 32000
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: }
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: }
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: role: "*"
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: }
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: attributes {
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: name: "category"
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: type: TEXT
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: text {
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: value: "SERVICE"
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: }
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: }
Jun 30 08:08:48 ip-172-16-3-95 marathon[13100]: (mesosphere.mesos.TaskBuilder:47)
有什么我失踪了吗?
感谢亚当的答案。我拍下了错误的日志,并将其更改为更清晰的日志。但是你在我之前发布的日志中是正确的,原因是RAM。 但在旁边,我错过了什么,或者我做错了什么? – hammi
如果您没有看到“提供不满足应用程序的约束......冲突约束是:...”日志警告,那么它不是一个约束匹配问题。我唯一能想到的另一件事是,你要求的是不在范围31003-32000内的'ports = List(0)'。但是,指定端口0应声称任何可用的端口并将其映射到$ PORT0。上述日志行中是否还有更多相关信息? – Adam
Jun 30 08:08:48 ip-172-16-3-95 marathon [13100]:[2015-06-30 08:08:48,812] WARN Offer未满足应用限制[]。 Jun 30 08:08:48 ip-172-16-3-95 marathon [13100]:冲突的约束是:[field:“category” Jun 30 08:08:48 ip-172-16-3-95 marathon [13100]:operator:CLUSTER Jun 30 08:08:48 ip-172-16-3-95 marathon [13100]:value:“SERVICE” Jun 30 08:08:48 ip-172-16-3- 95马拉松[13100]:](mesosphere.mesos.TaskBuilder:190) 我同时得到了你建议的消息!我可以提供哪些其他信息? –
hammi