oxidecomputer / oxidecomputer/omicron

sled-agent should heartbeat to nexus

Open
#2,986 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

nexus Sled Agent
Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

A basic aspect of fault detection for the control plane that nexus lacks today is the ability to notice if a sled has gone completely offline, including cases such as:

  • the sled is physically pulled from its cubby
  • the sled OS panicked
  • sled-agent is otherwise unresponsive
  • and many more possibilities

In such cases, nexus needs to be able to detect that the sled is seemingly gone and perhaps take actions such as:

  • reprovision control plane instances on the sled elsewhere
  • stop new provisions of customer instances
  • handle existing customer instances on the sled (dead migrate them off the sled? mark them as failed?)

Regardless, in order to take action at all, we need a basic detection mechanism. A simple proposal that we've landed on is having each sled-agent heartbeat to nexus on an interval. On the nexus side, we can store some number of timestamps of the last N heartbeats from a sled. We will likely want to establish a policy for how many missed heartbeats result in actions taken, including the more healing actions suggested above, and more simply, we may also want to mark a field on the sled table that indicates the sled has stopped heartbeating. We could potentially report this binary status (sled is heartbeating or not) on the console.

This ticket will cover work here, including:

  • establishing the sled-agent heartbeating API
  • adding support to the database for storing some number of sled heartbeats

We may want to punt on establishing policy, but for now, I can implement the above.

Related: #2483

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the sled-agent and nexus control-plane components, along with related issue #2483, to understand the proposed heartbeat API and database storage needs. Done means defining the heartbeat interaction and adding storage for a sled's recent heartbeats; policy for missed heartbeats may be deferred.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, backend, database, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.