-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Name sessions? #86
Comments
Hey @128keaton, thanks for the feedback. Mutagen's current session "orchestration" (if you can call it that) definitely leaves a lot to be desired. It works well-enough for long-term synchronization sessions that you might set up and leave running, but it's an awkward fit for the world of ephemeral containers. At the moment, I'm exploring a few designs, and I'm not sure exactly where things will land, but I think there'll be an answer within about 2 weeks. The question of named sessions (or at least controllable session identifiers) is something that has come up multiple times, both directly and indirectly (see, for example, issues #38, #43, #50, and, #57). Right now the primary proposal is to add "tags" (or "labels" - we haven't settled on a name) to synchronization sessions, which would allow users to more easily control synchronization sessions within the Mutagen daemon. While I think that tags/labels are a decent solution, I'm also exploring the idea of just cutting out the Mutagen daemon entirely, and instead allowing direct invocation of Mutagen synchronization sessions, e.g.
This would create and run a session and store all of the ancestor/cache data in the specified directory. The lifecycle of this session would be controlled by the lifecycle of the process, rather than by the While this design is a radical departure from Mutagen's current design, I think it's ultimately a better fit for Mutagen's long-term future. It removes the impedance mismatch between Mutagen's daemon and session lifecycle model and the various orchestration tools/scripts that developers use. And it does so without losing much in the way of functionality for people who want to set up long-term automatically reconnecting sessions (they'll just start the Anyway, that's where I'm looking to take things right now, but it's a little premature to promise that it's exactly how things will look. I figured I'd just write this up to give you an idea and maybe ask for a bit of feedback. |
CC @Toilal, @IngCr3at1on, @phromo, @matthew-gill, and @divoxx in case they have any thoughts on this "daemonless" Mutagen design that I've proposed above. I know all of you have had interest in easier scripting for Mutagen in the past. I'll probably prototype it up anyway, but I'd be happy to hear your thoughts. |
Where would the agent go in this scenario? |
@havoc-io thank you for the fast response! That solution sounds pretty good. Cannot wait to see what we can do in the future (features like an initial copy would be fantastic) |
I'm quite happy with the scripting I can do on top of the existing design. My compose scripts |
@IngCr3at1on They'd probably still go in the same place ( @phromo Thanks for the feedback, I think that's useful to hear. I think I'll work to prototype the proposed @128keaton Can you elaborate on what you mean by "initial copy"? If you mean starting with a base copy of the files (e.g. a snapshot baked into a container image from the latest Git commit or something), then you can actually do something similar now, though it takes a little bit of understanding of the synchronization mode that you're using and Mutagen's reconciliation algorithms. I'm happy to discuss via email or the mailing list if you're interested. If you mean something else, I'm interested to hear! |
@havoc-io in our setup, we have a composer image that is designed to boot, install deps from the Ideally, it would work like this:
|
I wrote a python application mutagen-helper, just released today, that wraps mutagen binary and can help to manage your sessions. Put configuration in a yaml file in a directory to sync, and run It supports naming sessions (optional), and you can create multiple sessions on the same "project" (=configuration file) You should have a look :) |
Mutagen v0.9.0-beta2 brings label/selector support for sessions, which should effectively be a superset of the "named session" functionality requested. It's designed to be comparible with the syntax that Kubernetes uses (since it actually re-uses the Kubernetes implementation). Please feel free to give it a spin. |
Just a quick update to this issue: v0.10.0 adds support for session names, either through the |
I am in the process of moving from docker-sync to mutagen for my docker setup. It would be fantastic if we could pass a name to the
mutagen create
command. For instance, runningmutagen list
returns multiple syncs for my multiple containers (as I have different ignores for each container):Having the sessions named would also make it easier to clean up after stopping my docker containers.
Just a thought!
Ideally,
mutagen list
andmutagen monitor
would return the randomly generated ID underSession:
if the name is not passed, and if it is, a newID:
entry would show that randomly generated ID.The text was updated successfully, but these errors were encountered: