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
Meteor tries to delete .meteorsession before saving it #8235
Comments
And the second question is, why does it try to write a session to .meteorsession if the tokens are the same (and valid)? |
The reason it's done in multiple steps is to ensure the atomicity of the file – that is to say, it's not ever in an invalid state (half-written, etc.) when being read by another process. Presumably, the reason why the session is re-written is to extend the session, though I haven't really looked into it too much. I'm not familiar with all the intricacies of how Docker would handle it, but have you looked into why the |
Thank for clarifying @abernix BUT, you can erase/append/write to it. For now as a workaround, i mount .meteorsession to .meteorsession_copy, then do this upon startup of the container: |
The I'm actually not sure how long the session is valid for, but I think it's quite a while. |
As mentioned in #8235 (comment), this is functioning as designed. Since this isn't a bug (and there hasn't been enough interest in changing this), I'll close this issue for now. If anyone is interested in changing this, please consider opening a feature request via http://github.com/meteor/meteor-feature-requests/issues. Thanks! |
Using the latest Meteor version.
I've recently tried to publish a package using a docker container, thus i'm mounting a .meteorsession file from host to the container (i.e. with
-v ~/.meteorsession:/root/.meteorsession
), but while publishing of course i got this:What is strange here is why meteor creates a new file to save session info? Looking at this line
https://github.com/meteor/meteor/blob/devel/tools/meteor-services/auth.js#L162
Isn't it too many file operations (create new file, delete the old one, rename the first one)? What's the reason for this? Why not just write to it? Is there a workaround to pass .meteorsession from host OS properly?
The text was updated successfully, but these errors were encountered: