add_paths is missing from files/riak.schema #566

binarytemple opened this Issue Jun 26, 2014 · 3 comments


None yet

3 participants


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

-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

%% We left riak_kv.add_paths out on purpose.

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

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 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-",""},
    {"-pa /usr/lib64/erlang/lib/mondemand-",""},
    {"-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