basho / riak

Riak is a decentralized datastore from Basho Technologies.
http://docs.basho.com
Apache License 2.0
3.92k stars 534 forks source link

fix: Remove - flag from su in riak startup script #1075

Open jrogov opened 3 years ago

jrogov commented 3 years ago

This is more of a request for comments than an actual PR.

Recently while tweaking our base image we've discovered that it's practically impossible to pass env variables (such as WAIT_FOR_ERLANG) from script.

I believe the reasons for this are the su lines with env passing turned off explicitly (via - aka -l flag) here:

As well as sud commands in node_package:

As a workaround, preliminary su to runner user (riak) in this case was used with passed env.

It left us wondering: was it done by purpose? Safety net of sorts to ensure safe environment?

martinsumner commented 3 years ago

I'm the git blame for the first of those, and honestly I don't know. I suspect I've copied something across, rather than having a specific purpose.

@martincox, @yorkshire-steve - do you have any opinions on this?

Bob-The-Marauder commented 3 years ago

Not sure if it's relevant but on the theme of waiting for Erlang, can you use riak-admin wait-for-service riak_kv riak@<nodeIP> as a work around? See https://www.tiot.jp/riak-docs/riak/kv/2.2.6/using/admin/riak-admin/#wait-for-service for details.

martinsumner commented 2 years ago

https://github.com/basho/riak/discussions/1088