Add separate OSD DB device support
Adds in three parts: 1. Create an API endpoint to create OSD DB volume groups on a device. Passed through to the node via the same command pipeline as creating/removing OSDs, and creates a volume group with a fixed name (osd-db). 2. Adds API support for specifying whether or not to use this DB volume group when creating a new OSD via the "ext_db" flag. Naming and sizing is fixed for simplicity and based on Ceph recommendations (5% of OSD size). The Zookeeper schema tracks the block device to use during removal. 3. Adds CLI support for the new and modified API endpoints, as well as displaying the block device and DB block device in the OSD list. While I debated supporting adding a DB device to an existing OSD, in practice this ended up being a very complex operation involving stopping the OSD and setting some options, so this is not supported; this can be specified during OSD creation only. Closes #142
This commit is contained in:
@ -520,6 +520,14 @@
|
||||
},
|
||||
"osd": {
|
||||
"properties": {
|
||||
"db_device": {
|
||||
"description": "The OSD database/WAL block device (logical volume); empty if not applicable",
|
||||
"type": "string"
|
||||
},
|
||||
"device": {
|
||||
"description": "The OSD data block device",
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"description": "The Ceph ID of the OSD",
|
||||
"type": "string (containing integer)"
|
||||
@ -5011,6 +5019,13 @@
|
||||
"name": "weight",
|
||||
"required": true,
|
||||
"type": "number"
|
||||
},
|
||||
{
|
||||
"description": "Whether to use an external OSD DB LV device",
|
||||
"in": "query",
|
||||
"name": "ext_db",
|
||||
"required": false,
|
||||
"type": "boolean"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@ -5133,6 +5148,45 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/storage/ceph/osddb": {
|
||||
"post": {
|
||||
"description": "Note: This task may take up to 30s to complete and return",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "The PVC node to create the OSD DB volume group on",
|
||||
"in": "query",
|
||||
"name": "node",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"description": "The block device (e.g. \"/dev/sdb\", \"/dev/disk/by-path/...\", etc.) to create the OSD DB volume group on",
|
||||
"in": "query",
|
||||
"name": "device",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Message"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Message"
|
||||
}
|
||||
}
|
||||
},
|
||||
"summary": "Add a Ceph OSD database volume group to the cluster",
|
||||
"tags": [
|
||||
"storage / ceph"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/storage/ceph/pool": {
|
||||
"get": {
|
||||
"description": "",
|
||||
@ -6248,6 +6302,68 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/vm/{vm}/device": {
|
||||
"delete": {
|
||||
"description": "",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "The raw Libvirt XML definition of the device to detach",
|
||||
"in": "query",
|
||||
"name": "xml",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Message"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Message"
|
||||
}
|
||||
}
|
||||
},
|
||||
"summary": "Hot-detach device XML to {vm}",
|
||||
"tags": [
|
||||
"vm"
|
||||
]
|
||||
},
|
||||
"post": {
|
||||
"description": "",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "The raw Libvirt XML definition of the device to attach",
|
||||
"in": "query",
|
||||
"name": "xml",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Message"
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad request",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/Message"
|
||||
}
|
||||
}
|
||||
},
|
||||
"summary": "Hot-attach device XML to {vm}",
|
||||
"tags": [
|
||||
"vm"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/vm/{vm}/locks": {
|
||||
"post": {
|
||||
"description": "",
|
||||
|
Reference in New Issue
Block a user