Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save frankscholten/3d989579c032473ec3847e134983e93a to your computer and use it in GitHub Desktop.
Save frankscholten/3d989579c032473ec3847e134983e93a to your computer and use it in GitHub Desktop.
Unreserve a port range in Mesos or DC/OS
curl -i \
-u xyz-principal \
-d slaveId=af5abbb4-da24-4591-8529-8cb62f15108b-S0 \
-d resources='[
{
"name": "ports",
"type": "RANGES",
"ranges": {
"range": [
{
"begin": 27017,
"end": 27017
}
]
},
"role": "xyz-role",
"reservation": {
"principal": "xyz-principal",
"labels": {
"labels": [
{
"key": "resource_id",
"value": "928fb3d0-d0aa-4b30-a2a0-879b3a1fe157"
}
]
}
}
}
]' \
-X POST http://master.mesos:5050/master/unreserve
@harryge00
Copy link

curl -i \
      -d slaveId=015b60ad-05f9-4c99-bb0e-b2c537348aab-S69 \
      -d resources='[
          {
            "name": "cpus",
            "type": "SCALAR",
            "scalar": { "value": 1 },
            "role": "ntt",
            "reservation": {
              "principal": "/ntt/elastic-16070-principal",
              "labels": {
                "labels": [
                  {
                    "key": "resource_id",
                    "value": "e3537d6b-64b9-4aef-9eae-4828bb9f54d3"
                  }
                ]
              }
            }
          }
      ]' \
      -X POST http://leader.mesos:5050/master/unreserve

For unreserve cpu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment