anybox / buttervolume

BTRFS Volume plugin for Docker
Apache License 2.0
82 stars 11 forks source link

kill the schedule Timer when the main process is killed? #38

Closed ccomb closed 1 year ago

ccomb commented 3 years ago

The main thread reacts to the SIGTERM signal, and propagates this to the Timer by canceling it. It happened once that the buttervolume docker plugin restart endlessly (for any external reason), and relaunch the schedule endlessly, creating too many snapshots, leading to a btrfs Unallocated space too low. More investigation need to be done, but the plugin is probably killed instead of terminated, so the Timer thread continues to work, blocking the kill, creating other snapshots, etc. It's probaby worth considering reacting to other signals such as SIGKILL.

ccomb commented 1 year ago

It's not possible to handle SIGKILL, I've added handler for the most common signals