signal: exit code for an unavailable aux component (AuxSigner / tapd)

Open
#11,477 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
22/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Active
Tech stack
go
Domain
backend

Research direction

Start with signal/exit_codes.go for the existing exit-code constants, then read the health-check and shutdown path that already uses RequestShutdownWithCode and the healthcheck.* config, as referenced in #11304. The open questions are design decisions: whether this becomes a new health check or is reported by the aux provider, what counts as unavailable, and how tapd takes part. Settle those with the maintainers before writing code. Done means a distinct exit code is returned when a required aux component goes down.

Written by the indexing model from the issue text.

Description

enhancement monitoring

Background

#11304 makes lnd exit with a distinct code for each health check that gives up (chain backend, disk space, TLS cert, tor, remote signer, leader status). Review discussion there (thread) raised one more case worth covering as a follow-up.

Problem

When lnd runs with aux components supplied by an external daemon (for example tapd providing AuxSigner, AuxLeafStore, AuxFundingController), that daemon can shut down on its own error. lnd then keeps running but cannot function properly, and nothing in the exit status or shutdown path identifies the aux component as the cause. Operators have hit this with tapd and had to work it out from logs.

Proposal

Add a dedicated exit code (for example ExitCodeAuxComponent in signal/exit_codes.go) and a path that reports it when a required aux component becomes unavailable.

Open questions, raised in the PR thread:

  • Should this be a new lnd health check (so it picks up the existing healthcheck.* config knobs and RequestShutdownWithCode plumbing), or should the aux provider detect and report the condition itself?
  • What does "unavailable" mean for an aux component: a failed liveness probe, or an error returned from an aux call?
  • How should tapd participate, since it owns the components and the integrated-mode lifecycle?

cc @ViktorT-11 @GeorgeTsagk

Dominant language
Go
Stars
8.2k
Forks
2.3k
Avg merge
1d 11h
Merged PRs (30d)
103

Getting set up

  • Ships a Dockerfile or Docker Compose file
  • Has a pull request template
  • No 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.

More from lightningnetwork/lnd

All issues in lightningnetwork/lnd

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.