Skip to content
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

Env variables (i.e. WAIT_FOR_ERLANG) do not persist during startup. #563

Closed
glickbot opened this issue Jun 23, 2014 · 7 comments · Fixed by basho/node_package#149
Closed
Assignees
Milestone

Comments

@glickbot
Copy link

Reproduce:
On Ubuntu (12.04), save 'export WAIT_FOR_ERLANG=60' in /etc/default/riak, run 'service riak start' which takes longer than 15 seconds. Notice it still only waits 15 seconds, not 60.

Variables set in /etc/default/riak don't persist if /usr/sbin/riak has to change the user riak is run as.

https://github.com/basho/node_package/blob/develop/priv/base/env.sh#L234

'su -' doesn't preserve env variables, should probably be 'su -m'.

@glickbot glickbot added this to the 2.0-RC milestone Jun 23, 2014
@jaredmorrow
Copy link
Contributor

This leaves us in a bit of a pickle, using 'service' strips all env, and Solaris doesn't support su -m. We might be too deep to fix this for RC. I'll try to think of the least risky fix for this, since at this point we can't just punt on Solaris.

@glickbot
Copy link
Author

alternately /usr/sbin/riak could source /etc/default/riak. Feels like a bit of a hack though, not sure that's the behavior we want.

@jaredmorrow
Copy link
Contributor

That's what I was initially thinking. We source it from the init.d script,
but clearly that is no longer effective.

On Mon, Jun 23, 2014 at 2:17 PM, Jon Glick notifications@github.com wrote:

alternately /usr/sbin/riak could source /etc/default/riak. Feels like a
bit of a hack though, not sure that's the behavior we want.


Reply to this email directly or view it on GitHub
#563 (comment).

@jonmeredith
Copy link
Contributor

@jaredmorrow were there any fixes outside basho/node_package#146 needed to close this?

@jaredmorrow
Copy link
Contributor

Something needs to still happen, I just needed to come back to it. I'll take a look again at it tomorrow.

@glickbot
Copy link
Author

Looks good, visual +1

@jaredmorrow
Copy link
Contributor

Will close issue when it is confirmed fixed in the RC packages.

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

Successfully merging a pull request may close this issue.

3 participants