[ 
https://issues.apache.org/jira/browse/MESOS-6596?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15672038#comment-15672038
 ] 

Kunal Thakar commented on MESOS-6596:
-------------------------------------

The master is running version 1.0.0-rc3 and the agent is running 1.0.1

The /master/state-summary endpoint shows that resources are available, and yet 
the /reserve call fails (and then eventually succeeds)
Pasting the body of the request:
{code}
curl -v -i -u <u>:<auth> -d slaveId=e6e07ff7-d0ff-4f57-a2b3-5e1929635a3f-S1633 
-d 'resources=[
{
  "name": "mem",
  "type": "SCALAR",
  "scalar": {
    "value": 120621
  },
  "role": "cassandra-cstar-reserve",
  "reservation": {
    "principal": "cassandra"
  }
},
{
  "name": "cpus",
  "type": "SCALAR",
  "scalar": {
    "value": 40
  },
  "role": "cassandra-cstar-reserve",
  "reservation": {
    "principal": "cassandra"
  }
},
{
  "name": "disk",
  "type": "SCALAR",
  "scalar": {
    "value": 2667849
  },
  "role": "cassandra-cstar-reserve",
  "reservation": {
    "principal": "cassandra"
  }
},
{
  "name": "ports",
  "type": "RANGES",
  "ranges": {
    "range": [
      {
        "begin": 30000,
        "end": 32000
      },
      {
        "begin": 7000,
        "end": 7001
      },
      {
        "begin": 7199,
        "end": 7199
      },
      {
        "begin": 9042,
        "end": 9042
      },
      {
        "begin": 9160,
        "end": 9160
      }
    ]
  },
  "role": "cassandra-cstar-reserve",
  "reservation": {
    "principal": "cassandra"
  }
}
]' -X POST http://<master>:5050/master/reserve
{code}

If it is a validation failure, it should always fail, but that doesn't seem to 
be the case here.

> Dynamic reservation endpoint returns 409s
> -----------------------------------------
>
>                 Key: MESOS-6596
>                 URL: https://issues.apache.org/jira/browse/MESOS-6596
>             Project: Mesos
>          Issue Type: Bug
>          Components: master
>            Reporter: Kunal Thakar
>
> The operation to dynamically reserve a host for a framework consistently 
> fails, but succeeds sometimes.
> We are calling the /reserve endpoint on the master with the same payload and 
> it mostly returns 409, with the occasional success. Pasting the output of two 
> consecutive /reserve calls:
> {code}
> * About to connect() to computexxx-yyy port 5050 (#0)
> *   Trying 10.184.21.3... connected
> * Server auth using Basic with user 'cassandra'
> > POST /master/reserve HTTP/1.1
> > Authorization: Basic blah
> > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.2j 
> > zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> > Host: computexxx-yyy:5050
> > Accept: */*
> > Content-Length: 1046
> > Content-Type: application/x-www-form-urlencoded
> > Expect: 100-continue
> >
> * Done waiting for 100-continue
> < HTTP/1.1 409 Conflict
> HTTP/1.1 409 Conflict
> < Date: Tue, 15 Nov 2016 23:07:10 GMT
> Date: Tue, 15 Nov 2016 23:07:10 GMT
> < Content-Type: text/plain; charset=utf-8
> Content-Type: text/plain; charset=utf-8
> < Content-Length: 58
> Content-Length: 58
> * HTTP error before end of send, stop sending
> <
> * Closing connection #0
> Invalid RESERVE Operation:  does not contain mem(*):120621
> {code}
> {code}
> * About to connect() to computexxx-yyy port 5050 (#0)
> *   Trying 10.184.21.3... connected
> * Server auth using Basic with user 'cassandra'
> > POST /master/reserve HTTP/1.1
> > Authorization: Basic blah
> > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.2j 
> > zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> > Host: computexxx-yyy:5050
> > Accept: */*
> > Content-Length: 1046
> > Content-Type: application/x-www-form-urlencoded
> > Expect: 100-continue
> >
> * Done waiting for 100-continue
> < HTTP/1.1 202 Accepted
> HTTP/1.1 202 Accepted
> < Date: Tue, 15 Nov 2016 23:07:16 GMT
> Date: Tue, 15 Nov 2016 23:07:16 GMT
> < Content-Length: 0
> Content-Length: 0
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to