I'm running a mesos + marathon cluster and so far everything works fine. But I can't figure out how to use constraints in marathon.
I have tagged my mesos slaves with attributes
$ cat /etc/mesos-slave/attributes/category
SERVICE
To the marathon description for my container I added
"constraints": [["category", "CLUSTER", "SERVICE"]]
But when I deploy my container I only get "INFO No matching offer for " and I can't figure out what I did wrong.
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)
Is there anything I am missing?