Update stack does not stop/start the container properly

Hi,

I use portainer on standalone server without swarm.

I notice every time I upgrade my db container form the stack I see :
InnoDB: Starting crash recovery from checkpoint

The issue is not present If I stop the container before.
The issue is not present with docker-compose with multiple “docker-compose up -d”

How “Update the stack” does exactly ?

If you are persisting your data in volumes it should not be crashing your DB when a new container is spawned, as it should use the same volume (and data) used by the previous container. So there could be an issue with Libcompose (the now depreciated library we use for stacks on docker standalone).

What are the logs in the Portainer container when you try to update the stack?

Hi,
I use a persistent volume for the db container.
I only got this in portainer logs :

INFO[0192] [0/1] [db]: Starting
INFO[0192] [1/1] [db]: Started
INFO[0206] [0/1] [db]: Starting
INFO[0206] Recreating db
INFO[0208] [1/1] [db]: Started

On the db container, before the container is deleted, I can’t see the shutdown procedure.

So there is a shutdown procedure for that container thats not happening?

Yeah. Update the stack doesn’t seem to shutdown the container.

Alright, this sounds like an issue with Libcompose (the now depreciated library we use for stacks on docker standalone) and not Portainer itself. As Portainer is not handling the update, we are actually passing it the Libcompose library.

We are going to replace Libcompose because of all the bugs, you can track the progress here.

In the mean time, I recommend you switch to Docker swarm as you should not have any issues since we are using the Docker swarm binary directly.