🐞 Bug: Unexpected containers update behavior.
Bug Description
When I update for example my media stack, or immich It restarts nonfunctional. I then go into the ui and restart it, same issue. I then ssh into the server and manually docker compose down && docker compose up -d and it everything is fine and dandy. I don't know if there is somehow a permissions issue, or there is something with the launch commands. Would prefer not to share all of my compose yamls.
Steps To Reproduce
Go to projects click update projects
Expected Behavior
Project goes online
Actual Behavior
Is borked.
Screenshots
No response
Arcane Version
1.9.0
Operating System
Linux
Browser
zen(firefox) latest
Docker Version
27.1.1
Additional Context
No response
The updater restarts the container not the entire project defintion, but this should matter it retains its exisiting config. Can you provide a bit more insight on what you mean by non functional?
I believe Gluetun restarts unhealthy, and others are set to stop or not start if until gluetun is healthy. I have had issues with other projects as well, I'm assuming its something networking related. All projects that I'm having issues with are multi-container i believe. Will mess with it some more when I have time or if you have a hunch.
@ThreeTheOG Can you try this image? ghcr.io/getarcaneapp/arcane:compose-restart
I just ran that version and ran into an odd issue. When I clicked “Update Projects” from the Projects page, the stack failed to start. Gluetun showed as healthy, but about half of the containers were marked as not created.
I SSH’d into the VM and ran my alias command:
docker compose pull && docker compose down && docker compose up -d
It ended up pulling four images in the stack, and after that everything came up fine. So I’m assuming the issue was that Arcane didn’t pull the updated images, but I’m not sure. Is there any kind of log I can check for image-pull errors from Arcane?
@ThreeTheOG If you set LOG_LEVEL=debug in the env and the redeploy arcane that should show you alot more information.
@ThreeTheOG Can you try this image please? ghcr.io/getarcaneapp/arcane:updater-restart
Does arcane doe a restart on the specific container? I think it should just do a "redeploy" ("Up"). Docker is smart (kinda) enough to recreate the changed containers, if the dependent containers (ie the ones that have "depends_on") have also set a restart: true for that dependency, docker engine will restart those too.
Force redeploy (https://github.com/getarcaneapp/arcane/issues/1376) might also help here.
Projects/Stacks are just a group of containers, restarting the individual container should keep all of its existing configuration. key word is should.
The update logic is very similar to watchtower. Thats how that project did it as well.
Auto update seem to break my immich and my paperless projects (almost?) each time when redis or postgres is auto-updated. The depending containers are not restarted. At some point in time I thought Arcane worked but it was probably because both the db and the depending container had updates, I suppose
Perhaps is it WAD, but right now I'm considering switching back to Komodo : it's got an optional "Full Stack Auto Update" switch on each stack (project), which "always redeploy full stack instead of just specific services with update".
I just works - so as long as 1 or more services have updates, it probably does a docker compose up -d (probably with --pull and --force-recreate.
Projects/Stacks are just a group of containers, restarting the individual container should keep all of its existing configuration. key word is should.
The update logic is very similar to watchtower. Thats how that project did it as well.
Stacks need to be redeployed if they have containers using something like network_mode: service:gluetun and gluetun is updated. The gluetun docker network will be destroyed and recreated when gluetun is, gluetun's docker network id will change, but the other containers will still be referencing the old network id and lose their connectivity. Watchtower had this issue as well.
Database container updates like @fgero mentioned probably also need the stack to be redeployed since other containers can break if the connection to the db container is interrupted.
Projects/Stacks are just a group of containers, restarting the individual container should keep all of its existing configuration. key word is should.
The update logic is very similar to watchtower. Thats how that project did it as well.
Stacks need to be redeployed if they have containers using something like
network_mode: service:gluetunand gluetun is updated. The gluetun docker network will be destroyed and recreated when gluetun is, gluetun's docker network id will change, but the other containers will still be referencing the old network id and lose their connectivity. Watchtower had this issue as well.Database container updates like @fgero mentioned probably also need the stack to be redeployed since other containers can break if the connection to the db container is interrupted.
Than that's what the depends on label can be used for for the updater , my point being is the config from each o container is cloned it's exact config is used again. Not saying there isn't something potentially wrong with it but just saying that how it works/should work.
Even when using both a depends_on and a com.getarcaneapp.arcane.depends-on for a container that depends on a database, for example, if the database has got an update and not the depending container, then only the database is restarted.
Could it be because Arcane is targeting the specific database container with a command like docker compose up -d database, so it is bypassing the docker dependency solver, I don't know.
A command that adresses the whole project/stack (like docker compose up -d) would, I think, stop the depending container, then restart the database with an update, then start the depending container.
I'm probably doing something wrong, but right now it does not seem to work even with the label, with depends_on, with a healthcheck, and a restart true :
services:
redis:
image: docker.io/library/redis:8
container_name: whoami-redis
hostname: whoami-redis
restart: unless-stopped
volumes:
- ${APPS_DATA}/whoami/redisdata:/data
security_opt:
- no-new-privileges:true
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
whoami:
image: traefik/whoami:latest
container_name: whoami
user: ${APPS_UID}:${APPS_GID}
environment:
- TZ=${APPS_TZ}
security_opt:
- no-new-privileges:true
restart: unless-stopped
depends_on:
redis:
condition: service_healthy
restart: true
labels:
com.getarcaneapp.arcane.depends-on: redis
Projects/Stacks are just a group of containers, restarting the individual container should keep all of its existing configuration. key word is should. The update logic is very similar to watchtower. Thats how that project did it as well.
Stacks need to be redeployed if they have containers using something like
network_mode: service:gluetunand gluetun is updated. The gluetun docker network will be destroyed and recreated when gluetun is, gluetun's docker network id will change, but the other containers will still be referencing the old network id and lose their connectivity. Watchtower had this issue as well. Database container updates like @fgero mentioned probably also need the stack to be redeployed since other containers can break if the connection to the db container is interrupted.Than that's what the depends on label can be used for for the updater , my point being is the config from each o container is cloned it's exact config is used again. Not saying there isn't something potentially wrong with it but just saying that how it works/should work.
The dependent containers always need to be redeployed if the networking container is updated, depends on only restarts so they still use the old networking container id, this could be fixed with a Full Stack Auto Update option like Komodo or a label to flag which ones need to be redeployed (since not necessarily every container in the stack is using the networking).
This issue seems like a good argument for an optional compose-managed update mode.
For services that belong to a compose project, Arcane could delegate the redeploy back to compose instead of updating containers independently. That would keep compose as the source of truth, and preserve dependency/startup behavior.
A toggle like for "use compose-managed updates for project services" would be very useful.
This issue seems like a good argument for an optional compose-managed update mode.
For services that belong to a compose project, Arcane could delegate the redeploy back to compose instead of updating containers independently. That would keep compose as the source of truth, and preserve dependency/startup behavior.
A toggle like for "use compose-managed updates for project services" would be very useful.
It was added here. cea81408118b46728aacb1eda140b4916b516279
This issue seems like a good argument for an optional compose-managed update mode. For services that belong to a compose project, Arcane could delegate the redeploy back to compose instead of updating containers independently. That would keep compose as the source of truth, and preserve dependency/startup behavior. A toggle like for "use compose-managed updates for project services" would be very useful.
It was added here. cea8140
That is great, thank you! I have a question about how this is implemented for compose stacks with multiple services. Say I have a stack with service and database. I want service to auto-update using the new docker compose up -d style behavior, but I want database excluded from auto-updates. Will this feature allow per-service update control? For example, could Arcane pull and recreate only service, while not pulling or recreating database even if a newer database image is available?
Is this still an issue after all of the updtaer changes? IF so i will try to focus on the bug next.
https://github.com/getarcaneapp/arcane/commit/cea81408118b46728aacb1eda140b4916b516279 fixed my gluetun and immich stack updates.
Ill close this out, if it is still an issue please let me know!