add_paths is missing from files/riak.schema #566

Open
binarytemple opened this Issue Jun 26, 2014 · 3 comments

Projects

None yet

3 participants

@binarytemple
Contributor

https://github.com/basho/riak/blob/develop/rel/files/riak.schema

It may not be the correct place to put it, but it isn't anywhere else either.

@angrycub Mentioned that it might be better to use -pa or -pz

http://erlang.org/doc/man/erl.html

-pa Dir1 Dir2 ...

Adds the specified directories to the beginning of the code path, similar to code:add_pathsa/1. See code(3).

As an alternative to -pa, if several directories are to be prepended to the code and the directories have a common parent directory, that parent directory could be specified in the ERL_LIBS environment variable. See code(3).

-pz Dir1 Dir2 ...

Adds the specified directories to the end of the code path, similar to code:add_pathsz/1. See code(3).

@seancribbs seancribbs modified the milestone: 2.0.1, 2.1 Jun 26, 2014
@seancribbs
Contributor

%% We left riak_kv.add_paths out on purpose.

https://github.com/basho/riak_kv/blob/develop/priv/riak_kv.schema#L276

@seancribbs seancribbs closed this Jun 26, 2014
@seancribbs seancribbs reopened this Jun 26, 2014
@binarytemple
Contributor

Until this gets added to a cuttlefish schema, the current way to add_paths is the following:

The new syslog style config system introduced with Riak 2.0 will also make use of an advanced.config if available to provide and/or override some settings.

To include Erlang paths:

1.) Stop Riak with riak stop
2.) Create a file called /etc/riak/advanced.config with the following contents where /tmp is replaced with your intended path

[{riak_kv, [{add_paths, [ "/tmp" ]}]}].

3.) Run riak chkconfig to confirm the syntax is valid
4.) Start Riak with riak start

@angrycub
Contributor
angrycub commented Oct 8, 2014

-pa and -pz can also be set in advanced.config like this:

[{vm_args, [
    % These have to be unique in the first element,
    % or they will be collapsed LWW fashion. Since
    % there can be multiple `-pa` options we 
    % just keep going until we accomplish a unique value
    % for the purpose of the config.  In some cases, the 
    % `-pa` key is the complete path.  
    {"-pa /usr/lib64/erlang/lib/lwes-2.3.1.0/ebin",""},
    {"-pa /usr/lib64/erlang/lib/mondemand-4.1.1.0/ebin",""},
    {"-pa /usr/lib64/erlang/lib/mondriak-0.4.0/ebin",""},
    ]},
...
]

This enables you to set Erlang VM flags for non-schema items, like -s, -pa, -pz, -scl

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