Open paneq opened 4 years ago
Thanks for bringing this up. This was actually by design, though I don't remember why to be honest... The Compose integration went through quite a few iterations and this may just be a vestigial behavior.
I also think it would make more sense to have the sessions and sidecar container halt on a CTRL-C rather than just mutagen compose down
. I'll try to implement that and see if I remember why it was the other way. It might be that the underlying reason is no longer relevant. Either way I'll get back to you on this ASAP.
Thank you for such a positive response. Have a great day and upcoming weekend 💛
Is there any way to clear all residual syncs at once, based on the docker-compose.yml
file?
My Docker crashed. Now I have dozen of mutagen syncs still running.
Then, if I docker-compose up
, all syncs are now created a second time (they then appear twice un mutagen sync list
).
If I docker-compose down
, only newly created syncs are removed... but older one are still there (in error: Last error: beta polling error: unable to receive poll response: unable to read message length: unexpected EOF)
Thanks.
@ByScripts The best way at the moment is probably to use a label filter with mutagen sync terminate
, e.g.
mutagen sync terminate --label-selector=io.mutagen.compose.project.name=<theprojectname>
You can see the corresponding labels/values using mutagen sync list -l
.
I know it's not super elegant, but I think this issue will be fixed with some upcoming changes.
Which version of Mutagen are you using (
mutagen version
)?0.12.0-beta2
Which operating system (platform/version/architecture) are you using?
MacOS
What is the issue that you're experiencing?
When stopping
mutagen compose
withCtrl+C
, the sidecar container continues running and the file sync session remains operational.What are the steps to reproduce the issue?
mutagen compose up
Ctrl+C
docker ps
What is the expected result of these steps in the absence of the issue?
The sidecar container to be stopped and the sync session terminated.
What is the actual result?
The container and sync session are alive.
Is there any other information that might be helpful?
Using
mutagen compose stop
ormutagen compose down
helps, but in my opinion it should not be necessary.Maybe this is related to splitting the config into two files?