diff --git a/README.org b/README.org index 8ffab3a..44a9fae 100644 --- a/README.org +++ b/README.org @@ -1,4 +1,9 @@ * node_package + +** Release 4.0.0 - Release notes + +Please see the [[RELEASE-NOTES.md][RELEASE-NOTES.md]] for breaking changes and explanation in 4.0.0 release. + ** Release 3.0.0 - Release notes Please see [[RELEASE-NOTES.md][RELEASE-NOTES.md]] for important changes in the 3.0.0 release of `node_package` diff --git a/RELEASE-NOTES.md b/RELEASE-NOTES.md index e7233cd..7990c4d 100644 --- a/RELEASE-NOTES.md +++ b/RELEASE-NOTES.md @@ -1,3 +1,9 @@ +# node_package 4.0.0 + +### Breaking ALIAS change +In the 4.0 branch, the `$NODETOOL` variable has been replaced by the `NODETOOL` alias. +This change was made to support distributed Erlang built-in TLS. Please see [this issue](https://github.com/basho/riak/issues/509) for more details. + # node_package 3.0.0 ## Security Improvements ### Introduction diff --git a/priv/base/env.sh b/priv/base/env.sh index cac7e27..d4f86d7 100755 --- a/priv/base/env.sh +++ b/priv/base/env.sh @@ -124,8 +124,12 @@ APP_VSN=${START_ERL#* } ERTS_PATH=$RUNNER_BASE_DIR/erts-$ERTS_VSN/bin # Setup command to control the node -NODETOOL="$ERTS_PATH/escript $ERTS_PATH/nodetool $NET_TICKTIME_ARG $NAME_ARG $COOKIE_ARG" -NODETOOL_LITE="$ERTS_PATH/escript $ERTS_PATH/nodetool" +if [ -f $RUNNER_ETC_DIR/vm.args ]; then + SSL_ARGS=`grep -e '^\-ssl_dist_opt' -e '^\-proto_dist' $RUNNER_ETC_DIR/vm.args | tr '\n' ' '` + ERL_FLAGS="$ERL_FLAGS $SSL_ARGS" +fi +alias NODETOOL="ERL_FLAGS=\"$ERL_FLAGS\" $ERTS_PATH/escript $ERTS_PATH/nodetool $NET_TICKTIME_ARG $NAME_ARG $COOKIE_ARG" +alias NODETOOL_LITE="ERL_FLAGS=\"$ERL_FLAGS\" $ERTS_PATH/escript $ERTS_PATH/nodetool" ## Are we using cuttlefish (http://github.com/basho/cuttlefish) @@ -140,7 +144,10 @@ fi # Ping node without stealing stdin ping_node() { - $NODETOOL ping < /dev/null + output=`NODETOOL ping < /dev/null` + status=$? + echo $output + return $status } # Attempts to create a pid directory like /var/run/APPNAME and then @@ -295,7 +302,7 @@ check_config() { fi fi - MUTE=`$NODETOOL_LITE chkconfig $CONFIG_ARGS` + MUTE=`NODETOOL_LITE chkconfig $CONFIG_ARGS` if [ "$?" -ne 0 ]; then echoerr "Error reading $CONFIG_ARGS" exit 1 @@ -320,7 +327,7 @@ check_ulimit() { # Set the PID global variable, return 1 on error get_pid() { - PID=`$NODETOOL getpid < /dev/null` + PID=`NODETOOL getpid < /dev/null` if [ "$?" -ne 0 ]; then echo "Node is not running!" return 1 diff --git a/priv/base/runner b/priv/base/runner index fd48a2b..fdc55c4 100755 --- a/priv/base/runner +++ b/priv/base/runner @@ -205,7 +205,7 @@ do_start() { if [ "$?" -ne 0 ]; then continue fi - PROCESS=`$NODETOOL rpcterms erlang whereis "'${WAIT_FOR_PROCESS}'."` + PROCESS=`NODETOOL rpcterms erlang whereis "'${WAIT_FOR_PROCESS}'."` if [ "$PROCESS" != "undefined" ]; then # Attempt to create a .pid file for the process create_pid_file @@ -231,7 +231,7 @@ do_stop() { fi # Tell nodetool to stop - $NODETOOL stop + NODETOOL stop ES=$? if [ "$ES" -ne 0 ]; then exit $ES @@ -306,9 +306,9 @@ case "$1" in echo "Remote Shell: Use \"Ctrl-G q\" to quit." echo "q() or init:stop() will terminate the $SCRIPT node." shift - RAND=$(($(($RANDOM % 1000)) + 1)) + RAND=$(($(($$ % 1000)) + 1)) NODE_NAME=${NAME_ARG#* } - exec $ERTS_PATH/erl -name c_$RAND_$NODE_NAME -hidden -remsh $NODE_NAME $COOKIE_ARG $NET_TICKTIME_ARG + exec $ERTS_PATH/erl -name c$RAND$NODE_NAME -hidden -remsh $NODE_NAME $COOKIE_ARG $NET_TICKTIME_ARG ;; console) @@ -363,7 +363,7 @@ case "$1" in node_up_check shift - RAND=$(($(($RANDOM % 1000)) + 1)) + RAND=$(($(($$ % 1000)) + 1)) NODE_NAME=${NAME_ARG#* } $ERTS_PATH/erl -noshell -noinput \ -pa $RUNNER_PATCH_DIR \