[PR #37] [MERGED] fix: stop containers during daemon shutdown #38

Closed
opened 2026-10-15 12:51:31 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/games-on-whales/LXC2Docker/pull/37
Author: @JBailes
Created: 5/22/2026
Status: ✅ Merged
Merged: 5/22/2026
Merged by: @JBailes

Base: main ← Head: fix/stop-containers-on-shutdown


📝 Commits (1)

  • 10c82ad fix: stop containers during daemon shutdown

📊 Changes

2 files changed (+68 additions, -2 deletions)

View changed files

📝 cmd/docker-lxc-daemon/main.go (+12 -2)
📝 internal/lxc/manager.go (+56 -0)

📄 Description

Summary

  • wait for the SIGTERM shutdown goroutine before exiting the daemon
  • stop all tracked running/paused LXC containers during daemon shutdown
  • keep container cleanup explicit because LXC monitors/payloads live outside the daemon service cgroup

Tests

  • go test ./cmd/docker-lxc-daemon ./internal/lxc ./internal/api

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/games-on-whales/LXC2Docker/pull/37 **Author:** [@JBailes](https://github.com/JBailes) **Created:** 5/22/2026 **Status:** ✅ Merged **Merged:** 5/22/2026 **Merged by:** [@JBailes](https://github.com/JBailes) **Base:** `main` ← **Head:** `fix/stop-containers-on-shutdown` --- ### 📝 Commits (1) - [`10c82ad`](https://github.com/games-on-whales/LXC2Docker/commit/10c82ad849b0ff0db8282a656c664c31e7c7a076) fix: stop containers during daemon shutdown ### 📊 Changes **2 files changed** (+68 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `cmd/docker-lxc-daemon/main.go` (+12 -2) 📝 `internal/lxc/manager.go` (+56 -0) </details> ### 📄 Description ## Summary - wait for the SIGTERM shutdown goroutine before exiting the daemon - stop all tracked running/paused LXC containers during daemon shutdown - keep container cleanup explicit because LXC monitors/payloads live outside the daemon service cgroup ## Tests - go test ./cmd/docker-lxc-daemon ./internal/lxc ./internal/api --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
games-on-whales/LXC2Docker#38
No description provided.