CancelRoleRemoval
const url = 'https://example.com/hopbox.admin.v1.ServerService/CancelRoleRemoval';const options = { method: 'POST', headers: { 'Connect-Protocol-Version': '1', 'Connect-Timeout-Ms': '1000', 'Content-Type': 'application/json' }, body: '{"id":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/hopbox.admin.v1.ServerService/CancelRoleRemoval \ --header 'Connect-Protocol-Version: 1' \ --header 'Connect-Timeout-Ms: 1000' \ --header 'Content-Type: application/json' \ --data '{ "id": "example" }'CancelRoleRemoval ends the pending removal of the roles of a server that cannot finish. No new move starts, and each move from the server that a removal of node started ends as CancelMove ends it. The server keeps every role, and the cordon of the removal goes.
Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”Define the version of the Connect protocol
Define the version of the Connect protocol
Example
1Define the timeout, in ms
Define the timeout, in ms
Example
1000Request Bodyrequired
Section titled “Request Bodyrequired”CancelRoleRemovalRequest names a server.
object
Id is the ID of the server.
Example generated
{ "id": "example"}Responses
Section titled “Responses”Success
CancelRoleRemovalResponse holds the server after the cancel.
object
object
Id is the ID of the server, a UUID.
Pool is the name of the pool of the server.
Hostname is the host name that the server sent at its enrollment.
Roles are the roles of the server, such as node or dns. Its certificate carries them.
Cordoned is true while an instance admin keeps the server cordoned, also while it is unresponsive.
Problems are the failed checks of the last heartbeat, such as a missing /dev/kvm.
Labels are the labels of the server, such as zone=gra.
object
Hopboxd_version is the version of hopboxd on the server, such as v0.1.0.
Kernel_release is the release of the host kernel, such as 6.18.57-hopbox1.
object
Arch is the CPU architecture, such as amd64.
Vendor is the CPU vendor, such as GenuineIntel.
Model_name is the name of the CPU model, such as Intel(R) Xeon(R) CPU E5-1650 v4 @ 3.60GHz.
Microcode is the microcode revision, such as 0xb000040.
Flags_hash is the SHA-256, in hex, of the sorted CPU flags.
Cpu_template is the Firecracker CPU template of the server, or none.
Compatibility_class names the servers that can restore the memory state of each other.
object
Cpu_threads is the count of CPU threads.
Memory_bytes is the size of the memory.
Disk_bytes is the size of the file system of the data dir.
Disk_free_bytes is the free space on the file system of the data dir.
Allocations are the resources that the machines of the server hold.
Allocation is what one machine holds on its server.
object
Machine_id is the ID of the machine.
Actions are the actions that the server started and did not finish yet.
ActionInProgress is an action that a server started and did not finish yet.
object
Machine_id is the ID of the machine of the action.
Action names the action, such as start.
Start_time is the start of the action.
Last_heartbeat_time is the time of the last heartbeat. It is absent before the first one.
Enroll_time is the time of the enrollment.
Certificate_expire_time is the end of the newest certificate of the server.
Version grows by 1 with each change of the row, such as each heartbeat.
Update_time is the time of the last change.
Labels_set_by_admin is true once SetServerLabels set the labels. The install then ignores the labels of the heartbeats.
Machine_count is the count of machines on the server that their executor has not deleted yet, stopped machines included. Their disks live on the server.
Mesh is the part of the server in the mesh. It is absent until the server reports the public key of its WireGuard device, and on a server without an address on the vRack.
object
Address is the mesh address of the server, in 10.239.0.0/16, such as 10.239.0.3.
Vrack_address is deprecated, and always empty. The mesh runs on the peer address of each server, the field peer_address of Server.
Public_key is the public key of the WireGuard device hbm0 of the server, in base64, as wg show prints it.
Dns_zone_serial is the serial of the zones that the DNS role of the server served at its last heartbeat. It is absent on a server without the DNS role, and before its first zones.
Drain is the drain of the server. It is absent on a server that does not drain, and after the decommission.
object
Start_time is the start of the drain, or of its last retry.
Moving counts the cold moves from the server that run now.
Stranded are the machines that the drain cannot move. Each one keeps its disk on the server.
StrandedMachine is a machine that the drain of a server, or the removal of its node role, cannot move.
object
Machine_id is the ID of the machine.
Name is the name of the machine.
Reason says why the machine cannot move.
On_server is false for a machine on another node whose disk a failed move left on the server (reference/cold-move.md “A step that an older control process accepted”).
Empty_checks counts the empty checks in a row: 0 to 3.
Last_check_time is the time of the last empty check. It is absent before the first one.
Error says why the drain waits now, such as a refused decommission. It is empty when the drain goes on.
Stuck is true when the drain cannot go on by itself: no move runs, and each machine left on the server is stranded, or the error names a refusal. A second DrainServer tries again.
Cordoned_before is true when the server was cordoned before the drain, or an instance admin cordoned it during the drain. CancelDrain then keeps the cordon.
Stranded_disks are the detached extra disks that the drain cannot move. Each one keeps its data on the server.
StrandedDisk is an extra disk that the drain of a server, or the removal of its node role, cannot move.
object
Disk_id is the ID of the disk.
Name is the name of the disk in its org.
Reason says why the disk cannot move.
Peer_address is the public IPv4 address at which the other servers reach the server, such as 203.0.113.12. It is empty on a server without one.
Removal is the pending removal of roles from the server. It is absent without one.
object
Roles are the roles that go, such as edge and dns.
Start_time is the start of the removal.
Cordoned_before is true when the server was cordoned before the removal. The end and the cancel of the removal lift only a cordon that the removal set.
Moving counts the cold moves from the server that run now.
Stranded are the machines that the removal of the node role cannot move. Each one keeps its disk on the server.
StrandedMachine is a machine that the drain of a server, or the removal of its node role, cannot move.
object
Machine_id is the ID of the machine.
Name is the name of the machine.
Reason says why the machine cannot move.
On_server is false for a machine on another node whose disk a failed move left on the server (reference/cold-move.md “A step that an older control process accepted”).
Error says why the removal waits now, such as a machine that has not booted yet. It is empty when the removal goes on.
Stuck is true when the removal of the node role cannot go on by itself: no move runs, and each machine left on the server is stranded.
Ready is true when the removal can end: the server holds no machine, no disk of a move, and no allocation, or the removal keeps the node role. An enrollment with the roles that stay then ends it.
Stranded_disks are the detached extra disks that the removal of the node role cannot move. Each one keeps its data on the server.
StrandedDisk is an extra disk that the drain of a server, or the removal of its node role, cannot move.
object
Disk_id is the ID of the disk.
Name is the name of the disk in its org.
Reason says why the disk cannot move.
Removed_roles are the roles that a removal took from the server. A token adds a role to the server only when this list holds the role.
Example
{ "server": { "state": "SERVER_STATE_UNSPECIFIED", "status": "SERVER_STATUS_UNSPECIFIED", "actions": [ { "startTime": "2023-01-15T01:30:15.01Z" } ], "lastHeartbeatTime": "2023-01-15T01:30:15.01Z", "enrollTime": "2023-01-15T01:30:15.01Z", "certificateExpireTime": "2023-01-15T01:30:15.01Z", "updateTime": "2023-01-15T01:30:15.01Z", "drain": { "startTime": "2023-01-15T01:30:15.01Z", "lastCheckTime": "2023-01-15T01:30:15.01Z" }, "removal": { "startTime": "2023-01-15T01:30:15.01Z" } }}default
Section titled “default”Error
Error type returned by Connect: https://connectrpc.com/docs/go/errors/#http-representation
object
The status code, which should be an enum value of [google.rpc.Code][google.rpc.Code].
A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the [google.rpc.Status.details][google.rpc.Status.details] field, or localized by the client.
A list of messages that carry the error details. There is no limit on the number of messages.
Contains an arbitrary serialized message along with a @type that describes the type of the serialized message, with an additional debug field for ConnectRPC error details.
object
A URL that acts as a globally unique identifier for the type of the serialized message. For example: type.googleapis.com/google.rpc.ErrorInfo.
The Protobuf message, serialized as bytes and base64-encoded. The specific message type is identified by the type field.
Deserialized error detail payload. The ‘type’ field indicates the schema. This field is for easier debugging and should not be relied upon for application logic.
object
Example
{ "code": "canceled"}