Skip to content

Read the release cookie from the environment #176

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

Closed

Conversation

pepicrft
Copy link

@pepicrft pepicrft commented Mar 6, 2025

This PR attempts to fix this issue.

I noticed the RELEASE_COOKIE variable passed to the binary generated by Burrito did not get forwarded to the underlying Erlang runtime. After diving into the code, I noticed that the logic that runs ERTS reads the cookie from a file and then passes it as an argument when shelling out.

I'm not familiar with Zig, so bear with me. The code below doesn't work, but I thought I'd push it to kick some discussions and get some pointers to push this to a finish line.

@pepicrft
Copy link
Author

@doawoo I'd appreciate your support in this one :)

@doawoo
Copy link
Contributor

doawoo commented Mar 14, 2025

Heyo!

I'll take a look at this soon. So to clarify your use case, you just want the underlying RELEASE_COOKIE env variable to be passed down into the erlang process when launched? Instead of the file?

@pepicrft
Copy link
Author

I'll take a look at this soon. So to clarify your use case, you just want the underlying RELEASE_COOKIE env variable to be passed down into the erlang process when launched? Instead of the file?

That's correct! Such that anyone can launch the Burrito-generated portable binary passing that variable at runtime:

RELEASE_COOKIE=foo ./burrito_binary

Thanks a lot @doawoo 🙏🏼. I appreciate that you'll look into this.

@doawoo
Copy link
Contributor

doawoo commented Apr 13, 2025

Ok I have a solution for this incoming! Your code helped kick this off, so thanks! Going to close this specific PR for now though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants