-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implements heartbeats for compute nodes, sending heartbeat messages to the requester node over NATS PubSub. The server, upon receiving a heartbeat updates the map of nodes to include the current server-side timestamp. Compute nodes using the heartbeat client, will continuously send heartbeat messages every n seconds. The heartbeat server receiving these heartbeats maintains a priority queue, which dequeues oldest items (lowest timestamp) first. Every 5 seconds any item older than a specific timestamp is dequeued, and its state either set to unhealthy (if it is the first missed heartbeat) or unknown if it is the second. The default for timestamps is * 30s since heartbeat - unhealthy * 60s since heartbeat - unknown (node may be live but disconnected) The next heartbeat sent by a unhealthy of unknown node will make it healthy again and ready to receive work. The current state of the node is added to the nodeinfo during a Get/GetByPrefix/List call to the node info store. This means that the liveness is dynamic and not persisted to the kvstore for node info.
- Loading branch information
Showing
43 changed files
with
1,392 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -221,7 +221,7 @@ multierror | |
multiformats | ||
Muxed | ||
mypy | ||
nats | ||
NATS | ||
nbconvert | ||
nemt | ||
NOAA | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
sidebar_label: approve | ||
--- | ||
|
||
# Command: `node approve` | ||
|
||
The `bacalhau node approve` command offers administrators the ability to approve the cluster membership for a node using its name. | ||
|
||
## Description: | ||
|
||
Using the `approve` sub-command under the `bacalhau node` umbrella, users can allow a node in the pending state to join the cluster and receive work. This feature is crucial for system administrators to manage the cluster. | ||
|
||
## Usage: | ||
|
||
```bash | ||
bacalhau node approve [id] [flags] | ||
``` | ||
|
||
## Flags: | ||
|
||
- `[id]`: | ||
|
||
- The unique identifier of the node you wish to describe. | ||
|
||
- `-h`, `--help`: | ||
|
||
- Displays the help documentation for the `describe` command. | ||
|
||
- `-m message`: | ||
|
||
- A message to be attached to the approval action. | ||
|
||
## Global Flags: | ||
|
||
- `--api-host string`: | ||
|
||
- Specifies the host for client-server communication through REST. This flag is overridden if the `BACALHAU_API_HOST` environment variable is set. | ||
- Default: `"bootstrap.production.bacalhau.org"` | ||
|
||
- `--api-port int`: | ||
|
||
- Designates the port for REST-based communication between client and server. This flag is overlooked if the `BACALHAU_API_PORT` environment variable is defined. | ||
- Default: `1234` | ||
|
||
- `--log-mode logging-mode`: | ||
|
||
- Determines the log format preference. | ||
- Options: `'default','station','json','combined','event'` | ||
- Default: `'default'` | ||
|
||
- `--repo string`: | ||
- Points to the bacalhau repository's path. | ||
- Default: `"`$HOME/.bacalhau"` | ||
|
||
## Examples: | ||
|
||
1. Approve a Node with ID `nodeID123`: | ||
|
||
```bash | ||
bacalhau node approve nodeID123 | ||
``` | ||
|
||
2. Approve a Node with an audit message: | ||
|
||
```bash | ||
bacalhau node approve nodeID123 -m "okay" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
sidebar_label: delete | ||
--- | ||
|
||
# Command: `node delete` | ||
|
||
The `bacalhau node delete` command offers administrators the ability to remove a node from the cluster using its name. | ||
|
||
## Description: | ||
|
||
Using the `delete` sub-command, administrators can remove a node from the list of available compute nodes in the cluster. This feature is necessary for the management of the infrastructure. | ||
|
||
## Usage: | ||
|
||
```bash | ||
bacalhau node delete [id] [flags] | ||
``` | ||
|
||
## Flags: | ||
|
||
- `[id]`: | ||
|
||
- The unique identifier of the node you wish to describe. | ||
|
||
- `-h`, `--help`: | ||
|
||
- Displays the help documentation for the `describe` command. | ||
|
||
- `-m message`: | ||
|
||
- A message to be attached to the deletion action. | ||
|
||
## Global Flags: | ||
|
||
- `--api-host string`: | ||
|
||
- Specifies the host for client-server communication through REST. This flag is overridden if the `BACALHAU_API_HOST` environment variable is set. | ||
- Default: `"bootstrap.production.bacalhau.org"` | ||
|
||
- `--api-port int`: | ||
|
||
- Designates the port for REST-based communication between client and server. This flag is overlooked if the `BACALHAU_API_PORT` environment variable is defined. | ||
- Default: `1234` | ||
|
||
- `--log-mode logging-mode`: | ||
|
||
- Determines the log format preference. | ||
- Options: `'default','station','json','combined','event'` | ||
- Default: `'default'` | ||
|
||
- `--repo string`: | ||
- Points to the bacalhau repository's path. | ||
- Default: `"`$HOME/.bacalhau"` | ||
|
||
## Examples: | ||
|
||
1. Delete the Node with ID `nodeID123`: | ||
|
||
```bash | ||
bacalhau node delete nodeID123 | ||
``` | ||
|
||
2. Delete a Node with an audit message: | ||
|
||
```bash | ||
bacalhau node delete nodeID123 -m "bad actor" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.