Skip to content

graceful shutdown#9111

Open
rustyrussell wants to merge 1 commit intoElementsProject:masterfrom
rustyrussell:guilt/graceful-shutdown
Open

graceful shutdown#9111
rustyrussell wants to merge 1 commit intoElementsProject:masterfrom
rustyrussell:guilt/graceful-shutdown

Conversation

@rustyrussell
Copy link
Copy Markdown
Contributor

@rustyrussell rustyrussell commented May 5, 2026

Against #8851 which used the Andrew Morton Technique on me.

This implements graceful, which tries to make the node idle. A future variant could use this for stop if a parameter is given (probably, a timeout before giving up and stopping anyway).

Fixes: #4842

@rustyrussell rustyrussell added this to the v26.06 milestone May 5, 2026
@rustyrussell rustyrussell requested a review from cdecker as a code owner May 5, 2026 07:04
@madelinevibes
Copy link
Copy Markdown
Collaborator

Does this PR resolve #7697 and/or #4842 ?

@rustyrussell rustyrussell force-pushed the guilt/graceful-shutdown branch from 59ae30b to fbf292f Compare May 5, 2026 10:50
Based on "lightningd: add "snub-idle-channels" dynamic config variable" by
Matt Whitlock <c-lightning@mattwhitlock.name>.

Fixes: ElementsProject#4842
Changelog-Added: JSON-RPC: `graceful` command to prepare CLN for shutdown.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@rustyrussell rustyrussell force-pushed the guilt/graceful-shutdown branch from fbf292f to d69e6dd Compare May 5, 2026 10:51
@madelinevibes madelinevibes added the Status::Ready for Review The work has been completed and is now awaiting evaluation or approval. label May 5, 2026
Comment thread lightningd/peer_control.c
if (msgtype == WIRE_CHANNEL_REESTABLISH
&& ignore_idle_channel(ld, channel)) {
log_debug(channel->log,
"Peer sent channel_reestablish, but gracefully shutting fown; "
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo "shutting down"

Copy link
Copy Markdown
Collaborator

@Lagrang3 Lagrang3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice. I've learned a lot studying this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Status::Ready for Review The work has been completed and is now awaiting evaluation or approval.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Graceful shutdown

3 participants