# crush

CRUSH map and rule management.
Set management node URL:

# GET /crush/rules/classes

# Parameters

  • No parameters...

# Endpoint

curl -X GET http://mgmt-node:8080/api/crush/rules/classes 

# Response 200

# Example response

[
  "string"
]

# POST /crush/rules/simple

# Parameters

  • bodyobject-
    • namestring-
    • startBucketstring-
    • independentstring-
    • deviceClassstring-
    • erasureCodingboolean-

# Endpoint

curl -X POST http://mgmt-node:8080/api/crush/rules/simple 

# Example body

{
  "name": "string",
  "startBucket": "string",
  "independent": "string",
  "deviceClass": "string",
  "erasureCoding": true
}

# POST /crush/rules/ssdPrimary

# Parameters

  • bodyobject-
    • namestring-
    • ssdStartBucketstring-
    • ssdIndependentstring-
    • ssdDeviceClassstring-
    • hddStartBucketstring-
    • hddIndependentstring-
    • hddDeviceClassstring-
    • ssdCopiesinteger-

# Endpoint

curl -X POST http://mgmt-node:8080/api/crush/rules/ssdPrimary 

# Example body

{
  "name": "string",
  "ssdStartBucket": "string",
  "ssdIndependent": "string",
  "ssdDeviceClass": "string",
  "hddStartBucket": "string",
  "hddIndependent": "string",
  "hddDeviceClass": "string",
  "ssdCopies": 0
}

# GET /crush/ec-profiles

# Parameters

  • No parameters...

# Endpoint

curl -X GET http://mgmt-node:8080/api/crush/ec-profiles 

# Response 200

# Example response

{}

# GET /crush/destroyed-osd-ids

# Parameters

  • No parameters...

# Endpoint

curl -X GET http://mgmt-node:8080/api/crush/destroyed-osd-ids 

# Response 200

  • destroyedOsdsarray-
    • idinteger-
    • hoststring-

# Example response

{
  "destroyedOsds": [
    {
      "id": 0,
      "host": "string"
    }
  ]
}

# GET /crush

# Parameters

  • No parameters...

# Endpoint

curl -X GET http://mgmt-node:8080/api/crush 

# Response 200

  • nodesarray-
    • idinteger-
    • namestring-
    • statusstring[UP, DOWN, DESTROYED, UNKNOWN]
    • typestring[OSD, HOST, CHASSIS, RACK, ROW, PDU, POD, ROOM, DATACENTER, REGION, ROOT, UNKNOWN]
    • childrenarray-
    • deviceClassstring-
    • sizeinteger-
    • usedinteger-
    • reweightnumber-
    • diskIdinteger-
    • serverIdinteger-
  • strayarray-
    • idinteger-
    • namestring-
    • statusstring[UP, DOWN, DESTROYED, UNKNOWN]
    • typestring[OSD, HOST, CHASSIS, RACK, ROW, PDU, POD, ROOM, DATACENTER, REGION, ROOT, UNKNOWN]
    • childrenarray-
    • deviceClassstring-
    • sizeinteger-
    • usedinteger-
    • reweightnumber-
    • diskIdinteger-
    • serverIdinteger-

# Example response

{
  "nodes": [
    {
      "id": 0,
      "name": "string",
      "status": "UP",
      "type": "OSD",
      "children": [
        0
      ],
      "deviceClass": "string",
      "size": 0,
      "used": 0,
      "reweight": ,
      "diskId": 0,
      "serverId": 0
    }
  ],
  "stray": [
    {
      "id": 0,
      "name": "string",
      "status": "UP",
      "type": "OSD",
      "children": [
        0
      ],
      "deviceClass": "string",
      "size": 0,
      "used": 0,
      "reweight": ,
      "diskId": 0,
      "serverId": 0
    }
  ]
}

# POST /crush

# Parameters

  • bodyobject-
    • nodesarray-
      • idinteger-
      • namestring-
      • statusstring[UP, DOWN, DESTROYED, UNKNOWN]
      • typestring[OSD, HOST, CHASSIS, RACK, ROW, PDU, POD, ROOM, DATACENTER, REGION, ROOT, UNKNOWN]
      • childrenarray-
      • deviceClassstring-
      • sizeinteger-
      • usedinteger-
      • reweightnumber-
      • diskIdinteger-
      • serverIdinteger-
    • strayarray-
      • idinteger-
      • namestring-
      • statusstring[UP, DOWN, DESTROYED, UNKNOWN]
      • typestring[OSD, HOST, CHASSIS, RACK, ROW, PDU, POD, ROOM, DATACENTER, REGION, ROOT, UNKNOWN]
      • childrenarray-
      • deviceClassstring-
      • sizeinteger-
      • usedinteger-
      • reweightnumber-
      • diskIdinteger-
      • serverIdinteger-

# Endpoint

curl -X POST http://mgmt-node:8080/api/crush 

# Example body

{
  "nodes": [
    {
      "id": 0,
      "name": "string",
      "status": "UP",
      "type": "OSD",
      "children": [
        0
      ],
      "deviceClass": "string",
      "size": 0,
      "used": 0,
      "reweight": ,
      "diskId": 0,
      "serverId": 0
    }
  ],
  "stray": [
    {
      "id": 0,
      "name": "string",
      "status": "UP",
      "type": "OSD",
      "children": [
        0
      ],
      "deviceClass": "string",
      "size": 0,
      "used": 0,
      "reweight": ,
      "diskId": 0,
      "serverId": 0
    }
  ]
}

# Response 200

  • idinteger-
  • descriptionstring-
  • createdByobject-
    • idinteger-
    • namestring-
  • affectedObjectstring-
  • changesarray-
    • typestring-
  • statestring[PENDING, APPROVED, REJECTED]

# Example response

{
  "id": 0,
  "description": "string",
  "createdBy": {
    "id": 0,
    "name": "string"
  },
  "affectedObject": "string",
  "changes": [
    {
      "type": "string"
    }
  ],
  "state": "PENDING"
}

# DELETE /crush/rules/{name}

# Parameters

  • namestring-

# Endpoint

curl -X DELETE http://mgmt-node:8080/api/crush/rules/{name} 

# GET /crush/rules

# Parameters

  • No parameters...

# Endpoint

curl -X GET http://mgmt-node:8080/api/crush/rules 

# Response 200

  • idinteger-
  • namestring-
  • typestring[REPLICATED, ERASURE]
  • minSizeinteger-
  • maxSizeinteger-
  • stepsarray-
    • opstring[TAKE, CHOOSE, CHOOSE_INDEP, CHOOSELEAF, CHOOSELEAF_INDEP, EMIT, NOOP, UNKNOWN, TUNING]
    • crushMapTextFormatstring-

# Example response

[
  {
    "id": 0,
    "name": "string",
    "type": "REPLICATED",
    "minSize": 0,
    "maxSize": 0,
    "steps": [
      {
        "op": "TAKE",
        "crushMapTextFormat": "string"
      }
    ]
  }
]