Shutdown timeout for containers

Jun 5, 2022
2
0
6
I had a container hang on host shutdown the other day. The message was that the timeout was unlimited so after a while I had no choice but to hard reset the host. Obviously I would like to avoid ever having to do that.

The docs say that setting Shutdown timeout for a VM will cause it to be stopped forcefully if it's still running after the timeout. But the Shutdown timeout for a container will only "notify that the shutdown action failed"? That is not helpful. Is there a supported way to force a container shutdown after a timeout when the host is shutting down?
 
Man pct.conf says the following. Which conflicts with the docs and just confuses the issue more.

startup: `[[order=]\d+] [,up=\d+] [,down=\d+] `
Startup and shutdown behavior. Order is a non-negative number defining the general startup order. Shutdown in done with reverse ordering. Additionally you can set the up or down delay in seconds, which specifies a delay to wait before the next VM is started or stopped.