You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After removing a docker-compose YAML from a repository that's been used to create a Stack, and the Stack was updated via GitOps (in my case, a webhook), the Stack automatically removes the containers but is unable to be deleted. It fails with:
failed to remove a stack: docker compose command failed: chdir /data/compose/{stack_id}/...: no such file or directory
This occured as I've setup some automations around stack deployment and updates that use a monorepo of compose files. I renamed some of the compose YAML files and ran into this bug.
Expected Behavior
The Stack should be possible to delete.
Actual Behavior
The stack fails to delete.
Steps to Reproduce
Create a Stack from a Git repository
Setup GitOps to update
Remove the YAML from the repostory, and wait for the Stack to update
Attempt to delete the Stack
Portainer logs or screenshots
No response
Portainer version
2.19.5
Portainer Edition
Business Edition (BE/EE) with 5NF / 3NF license
Platform and Version
Docker 24.0.7
OS and Architecture
Debian AMD64
Browser
No response
What command did you use to deploy Portainer?
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered:
I was having a really similar issue, except I deleted the entire repository. I was able to work around it by fiddling with the database and the filesystem (but this is only in my lab environment so I'm not too worried about breaking stuff.)
In all honesty what I did was pretty janky, and restoring from a backup was probably the move, but...
Here's how I brutally forced it to delete it. Most of these steps were a part of going on the journey, but probably aren't all necessary.
Find the ID of the stack (in my case it was 48)
Remove the contents of 48 (/portainer/compose/48/)
Stop Portainer and make a copy of the database, and a backup (/portainer/portainer.db)
Edit the copy of the database with something like BoltBrowser cli
Find stacks, then 48 in the db
Edit JSON in the db and set EntryPoint to ""
Edit JSON in the db and set ConfigHash to ""
Overwrite portainer.db with the modified version
Start Portainer
Delete stack normally from the GUI
I'm guessing you probably don't need to delete the ConfigHash if you delete the EntryPoint, or delete anything from the filesystem, It's just what I clumsily tried first and was too lazy to undo.
Before you start please confirm the following.
Problem Description
After removing a docker-compose YAML from a repository that's been used to create a Stack, and the Stack was updated via GitOps (in my case, a webhook), the Stack automatically removes the containers but is unable to be deleted. It fails with:
This occured as I've setup some automations around stack deployment and updates that use a monorepo of compose files. I renamed some of the compose YAML files and ran into this bug.
Expected Behavior
The Stack should be possible to delete.
Actual Behavior
The stack fails to delete.
Steps to Reproduce
Portainer logs or screenshots
No response
Portainer version
2.19.5
Portainer Edition
Business Edition (BE/EE) with 5NF / 3NF license
Platform and Version
Docker 24.0.7
OS and Architecture
Debian AMD64
Browser
No response
What command did you use to deploy Portainer?
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: