Skip to content

Rebuild the cluster from an older Raft format

POST
/cluster/rebuild
curl --request POST \
--url https://sylve.lan:8181/api/cluster/rebuild \
--header 'Content-Type: application/json' \
--data '{ "candidate": true, "joinKey": true, "lastIndex": 1, "lastTerm": 1, "nodeId": "example" }'

Answers another member upgrading from an older Raft format: how up to date this node is, its vote, and, from the founder, a join key. The message and the answer carry a MAC, with the old cluster key, of the TLS session.

The member’s message

Media typeapplication/json
object
candidate
boolean
joinKey
boolean
lastIndex
integer
lastTerm
integer
nodeId
string
Examplegenerated
{
"candidate": true,
"joinKey": true,
"lastIndex": 1,
"lastTerm": 1,
"nodeId": "example"
}

Answer

Media typeapplication/json
object
data
object
founded
boolean
joinKey
string
lastIndex
integer
lastTerm
integer
nodeId
string
vote
string
error
string
message
string
status
string
Examplegenerated
{
"data": {
"founded": true,
"joinKey": "example",
"lastIndex": 1,
"lastTerm": 1,
"nodeId": "example",
"vote": "example"
},
"error": "example",
"message": "example",
"status": "example"
}

Bad Request

Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{
"data": "example",
"error": "example",
"message": "example",
"status": "example"
}

No valid MAC

Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{
"data": "example",
"error": "example",
"message": "example",
"status": "example"
}

Not a member of the old cluster

Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{
"data": "example",
"error": "example",
"message": "example",
"status": "example"
}

No rebuild running

Media typeapplication/json
object
data
error
string
message
string
status
string
Examplegenerated
{
"data": "example",
"error": "example",
"message": "example",
"status": "example"
}