Skip to content

Make graceful restarting available in wider configurations#2077

Merged
AkihiroSuda merged 3 commits intocontainerd:mainfrom
ktock:gracefulrestart-b
Jul 10, 2025
Merged

Make graceful restarting available in wider configurations#2077
AkihiroSuda merged 3 commits intocontainerd:mainfrom
ktock:gracefulrestart-b

Conversation

@ktock
Copy link
Copy Markdown
Member

@ktock ktock commented Jul 8, 2025

Depends on #2076
Following up #1892

When stargz snapshotter receives SIGINT, it perform the graceful exit with explicitly unmounting the mountpoints and releasing the associated resources.

This PR makes this avilablable also in the following situations

  • when FUSE manager is killed by SIGINT. The user can use SIGTERM and SIGINT for different porpose
    • SIGTERM: Usable for restarting only containerd-stargz-grpc (e.g. for reloading configuration). No need to unmount snapshots because they are managed by the FUSE manager.
    • SIGINT: Usable when the user wants to use the graceful exit feature of containerd-stargz-grpc because the user will kill the FUSE manager for node restart, etc.
  • when containerd-stargz-grpc is killed by SIGTERM (systemd's default KillSignal)

This PR also adds docs about how to gracefully kill and restart Stargz Snapshotter under different configurations.

@ktock ktock force-pushed the gracefulrestart-b branch 3 times, most recently from 71d4640 to c18b7b1 Compare July 9, 2025 01:10
@ktock ktock marked this pull request as ready for review July 9, 2025 02:08

// Close is the same as Done. But this evicts the resources related to this Layer immediately.
// This can be used for cleaning up resources on unmount.
Close()
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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


RUN apt-get update -y && \
apt-get --no-install-recommends install -y iptables jq && \
apt-get install -y iptables jq netcat && \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why drop --no-install-recommends

@ktock ktock force-pushed the gracefulrestart-b branch 2 times, most recently from f0715d7 to 561aa03 Compare July 9, 2025 05:57
@ktock ktock force-pushed the gracefulrestart-b branch from 561aa03 to 5b78e51 Compare July 9, 2025 07:27
@AkihiroSuda AkihiroSuda merged commit acb3e90 into containerd:main Jul 10, 2025
63 of 67 checks passed
@ktock ktock deleted the gracefulrestart-b branch July 11, 2025 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants