Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Riaknostic no longer escript. Alter build process accordingly. #329

Merged
merged 2 commits into from

2 participants

Brian Sparrow Jared Morrow
Brian Sparrow
Collaborator

Clean up rebar.config, add riaknostic to reltool, alter riak-admin diag to accommodate non-escript behavior.

Also fixes: basho/riak#317

Jared Morrow

Things I checked:

  • Devrel build & riak-admin diag testing
  • dist build & source tarball build while offline

Two things need to get done if possible, but not before this PR gets in.

  • The riak_test riaknostic test needs to be changed for the new behavior
  • The readme for riaknostic needs to be updated for the new behavior

@bsparrow435 I removed extra riaknostic calls from the Makefile that weren't needed anymore.

+1

Brian Sparrow bsparrow435 merged commit 10749bc into from
Brian Sparrow
Collaborator

Merging, opened issues against riaknostic for README and riak_test for riaknostic_rt.erl changes. Merging.

Jared Morrow jaredmorrow deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 22 additions and 40 deletions.
  1. +2 −17 Makefile
  2. +19 −23 rel/files/riak-admin
  3. +1 −0  rel/reltool.config
19 Makefile
View
@@ -48,24 +48,12 @@ test: deps compile testclean
##
## Release targets
##
-rel: deps compile generate riaknostic-rel
+rel: deps compile generate
relclean:
rm -rf rel/riak
##
-## Riaknostic targets
-##
-riaknostic: deps
- $(MAKE) -C deps/riaknostic -f Makefile
-
-riaknostic-rel: riaknostic
- rm -rf rel/riak/lib/riaknostic
- mkdir -p rel/riak/lib/riaknostic
- cp -f deps/riaknostic/riaknostic rel/riak/lib/riaknostic/
-
-
-##
## Developer targets
##
## devN - Make a dev build for node N
@@ -85,13 +73,10 @@ SEQ = $(shell awk 'BEGIN { for (i = 1; i < '$(DEVNODES)'; i++) printf("%i ", i);
$(eval stagedevrel : $(foreach n,$(SEQ),stagedev$(n)))
$(eval devrel : $(foreach n,$(SEQ),dev$(n)))
-dev% : all riaknostic
+dev% : all
mkdir -p dev
rel/gen_dev $@ rel/vars/dev_vars.config.src rel/vars/$@_vars.config
(cd rel && ../rebar generate target_dir=../dev/$@ overlay_vars=vars/$@_vars.config)
- rm -rf dev/$@/lib/riaknostic
- mkdir -p dev/$@/lib/riaknostic
- cp -f deps/riaknostic/riaknostic dev/$@/lib/riaknostic/
stagedev% : dev%
$(foreach dep,$(wildcard deps/*), rm -rf dev/$^/lib/$(shell basename $(dep))* && ln -sf $(abspath $(dep)) dev/$^/lib;)
42 rel/files/riak-admin
View
@@ -435,32 +435,28 @@ case "$1" in
;;
diag)
- # Riaknostic location
- RIAKNOSTIC_LOC="$ERTS_PATH/../../lib/riaknostic/riaknostic"
-
- # Riaknostic user
- RIAKNOSTIC_USER=$RUNNER_USER
- if [ -z $RUNNER_USER ]; then
- RIAKNOSTIC_USER=$LOGNAME
- fi
-
- # Setup command to run riaknostic
- RIAKNOSTIC="$ERTS_PATH/escript $RIAKNOSTIC_LOC --user $RIAKNOSTIC_USER \
- --etc $RUNNER_ETC_DIR --base $RUNNER_BASE_DIR"
-
- # URL for Riaknostic download instructions
- RIAKNOSTIC_URL="http://riaknostic.basho.com/"
+ case "$2" in
+ --help|-h)
+ echo "Usage: riak-admin diag [-d <level>] [-l] [-h] [--export] [check_name ...]"
+ echo ""
+ echo "-h, --help Display help/usage dialogue"
+ echo "-d, --level Minimum message severity level (default: notice)"
+ echo "-l, --list Describe available diagnostic tasks"
+ echo "--export Package system info in '$CWD/export.zip'"
+ echo "check_name A specific check to run"
+ exit 1
+ ;;
+ *)
+ node_up_check
- shift
+ # Setup command to run riaknostic
+ RIAKNOSTIC="$NODETOOL rpc riaknostic main \
+ --etc $RUNNER_ETC_DIR --base $RUNNER_BASE_DIR"
- if [ -f "$RIAKNOSTIC_LOC" ]; then
- $RIAKNOSTIC "$@"
- else
- echo "Riak diagnostics utility is not present!"
- echo "Visit $RIAKNOSTIC_URL for instructions."
- exit 1
- fi
+ shift
+ $RIAKNOSTIC "$@"
+ esac
;;
top)
# Make sure the local node IS running
1  rel/reltool.config
View
@@ -42,6 +42,7 @@
{app, cluster_info, [{incl_cond, include}]},
{app, erlang_js, [{incl_cond, include}]},
{app, ebloom, []},
+ {app, riaknostic, [{incl_cond, include}]},
{app, bitcask, [{incl_cond, include}]},
{app, riak_core, [{incl_cond, include}]},
{app, riak_pipe, [{incl_cond, include}]},
Something went wrong with that request. Please try again.