Skip to content

Commit

Permalink
Merge branch 'develop-3.0' of https://github.com/basho/riak into deve…
Browse files Browse the repository at this point in the history
…lop-3.0
  • Loading branch information
martinsumner committed Jul 15, 2021
2 parents 7b349b9 + 7d78666 commit 416b17b
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 19 deletions.
13 changes: 9 additions & 4 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@

{copy, "rel/files/check_ulimit", "bin/hooks/check_ulimit"},
{copy, "rel/files/erl_maxlogsize", "bin/hooks/erl_maxlogsize"},
{copy, "rel/files/erl_codeloadingmode","bin/hooks/erl_codeloadingmode"},
{copy, "rel/files/riak_not_running", "bin/hooks/riak_not_running"},
{copy, "rel/files/app_epath.sh", "lib/app_epath.sh"}

Expand All @@ -119,7 +120,8 @@
[{pre_start,
[{custom, "hooks/riak_not_running"},
{custom, "hooks/check_ulimit"},
{custom, "hooks/erl_maxlogsize"}]},
{custom, "hooks/erl_maxlogsize"},
{custom, "hooks/erl_codeloadingmode"}]},
{post_start,
[{wait_for_process, riak_core_node_watcher}]}
]}
Expand All @@ -131,7 +133,8 @@
[{pre_start,
[{custom, "hooks/riak_not_running"},
{custom, "hooks/check_ulimit"},
{custom, "hooks/erl_maxlogsize"}]},
{custom, "hooks/erl_maxlogsize"},
{custom, "hooks/erl_codeloadingmode"}]},
{post_start,
[{wait_for_process, riak_core_node_watcher}]}
]}
Expand All @@ -148,7 +151,8 @@
[{pre_start,
[{custom, "hooks/riak_not_running"},
{custom, "hooks/check_ulimit"},
{custom, "hooks/erl_maxlogsize"}]},
{custom, "hooks/erl_maxlogsize"},
{custom, "hooks/erl_codeloadingmode"}]},
{post_start,
[{pid, "/var/run/riak/riak.pid"},
{wait_for_process, riak_core_node_watcher}]}
Expand All @@ -165,7 +169,8 @@
[{pre_start,
[{custom, "hooks/riak_not_running"},
{custom, "hooks/check_ulimit"},
{custom, "hooks/erl_maxlogsize"}]},
{custom, "hooks/erl_maxlogsize"},
{custom, "hooks/erl_codeloadingmode"}]},
{post_start,
[wait_for_vm_start,
{pid, "/run/riak/riak.pid"},
Expand Down
3 changes: 3 additions & 0 deletions rel/files/erl_codeloadingmode
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
CODE_LOADING_MODE="${CODE_LOADING_MODE:-interactive}"
export CODE_LOADING_MODE
28 changes: 14 additions & 14 deletions rel/files/riak-admin
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Usage: $SCRIPT stat <command>
The following commands display, enable/disable and reset statistics.
A statistics entry is given either as a 'dotted' exometer name -
Identifiers separated by periods, '.', e.g. riak.riak_kv.node.gets,
or as a 'legacy' name (same as in riak-admin status) - e.g. node_gets.
or as a 'legacy' name (same as in riak admin status) - e.g. node_gets.
When a legacy name is listed, the corresponding exometer name is shown as well.
Two kinds of wildcard are suppored:
Expand Down Expand Up @@ -122,15 +122,15 @@ will match all stats entries. All Riak stat entry names start with 'riak',
so \`stat show riak.**\` will match all riak stat entries.
Example:
\$ bin/riak-admin stat show riak.riak_kv.node.gets
\$ bin/riak admin stat show riak.riak_kv.node.gets
[riak,riak_kv,node,gets]: [{count,0},{one,0}]
- 'Legacy name': The stat names used e.g. in \`$SCRIPT status\` can be used
here, but also with wildcard support. The corresponding Exometer name and
datapoint will be shown as well.
Example:
\$ bin/riak-admin stat show node_gets
\$ bin/riak admin stat show node_gets
== node_gets (Legacy pattern): ==
node_gets: 0 ([riak,riak_kv,node,gets]/one)
Expand All @@ -141,22 +141,22 @@ be present, so '*.**' would work as a catch-all expression.)
Each Exometer entry has a type and a set of datapoints. A filter can be
given on the command line, selecting only a subset of datapoints:
\$ bin/riak-admin stat show riak.riak_kv.node.gets/one
\$ bin/riak admin stat show riak.riak_kv.node.gets/one
[riak,riak_kv,node,gets]: [{one,0}]
The type can also be restricted:
\$ bin/riak-admin stat show *.**/type=duration/mean,max
\$ bin/riak admin stat show *.**/type=duration/mean,max
[riak,riak_core,converge_delay]: [{mean,0},{max,0}]
[riak,riak_core,rebalance_delay]: [{mean,0},{max,0}]
Note how multiple datapoints are separated by comma (no space).
Showing disabled entries:
\$ bin/riak-admin stat show riak.riak_kv.node.gets
\$ bin/riak admin stat show riak.riak_kv.node.gets
No matching stats
\$ bin/riak-admin stat show riak.riak_kv.node.gets/status=*
\$ bin/riak admin stat show riak.riak_kv.node.gets/status=*
[riak,riak_kv,node,gets]: disabled
\$ bin/riak-admin stat show riak.riak_kv.node.gets/status=disabled
\$ bin/riak admin stat show riak.riak_kv.node.gets/status=disabled
[riak,riak_kv,node,gets]: disabled
"
}
Expand All @@ -171,16 +171,16 @@ updated, and have no value.
The same syntax can be used as in \`stat show\`. The requested action will be
performed on the matching entries.
\$ bin/riak-admin stat disable node_gets
\$ bin/riak admin stat disable node_gets
== node_gets (Legacy pattern): ==
[riak,riak_kv,node,gets]: disabled
\$ bin/riak-admin stat enable node_gets
\$ bin/riak admin stat enable node_gets
== node_gets (Legacy pattern): ==
[riak,riak_kv,node,gets]: enabled
Wildcards can be used:
\$ bin/riak-admin stat disable riak.riak_kv.node.*
\$ bin/riak admin stat disable riak.riak_kv.node.*
[riak,riak_kv,node,gets]: disabled
[riak,riak_kv,node,puts]: disabled
"
Expand All @@ -202,7 +202,7 @@ with options:
The same entry formats can be used as for all other stat subcommands.
Example:
\$ bin/riak-admin stat info riak.riak_kv.node.gets
\$ bin/riak admin stat info riak.riak_kv.node.gets
[riak,riak_kv,node,gets]: name = [riak,riak_kv,node,gets]
type = spiral
module = exometer_spiral
Expand All @@ -212,7 +212,7 @@ Example:
timestamp = undefined
options = [{status,disabled}]
\$ bin/riak-admin stat info -type -status riak.riak_kv.node.gets
\$ bin/riak admin stat info -type -status riak.riak_kv.node.gets
[riak,riak_kv,node,gets]: type = spiral
status = disabled
"
Expand Down Expand Up @@ -985,7 +985,7 @@ case "$1" in
diag)
case "$2" in
--help|-h)
echo "Usage: riak-admin diag [-d <level>] [-l] [-h] [--export] [check_name ...]"
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)"
Expand Down
2 changes: 1 addition & 1 deletion rel/pkg/rpm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ PWD = $(shell pwd)
PKG_VERSION_NO_H ?= $(shell echo $(PKG_VERSION) | tr - .)

default:
rpmbuild --define "_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}$(DISTRO)%%{ARCH}.rpm" \
rpmbuild --define "_rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}$(DISTRO).%%{ARCH}.rpm" \
--define '_topdir $(BASE_DIR)/rel/pkg/out/' \
--define '_sourcedir $(BASE_DIR)/rel/pkg/out/' \
--define '_specdir $(BASE_DIR)/rel/pkg/out/' \
Expand Down

0 comments on commit 416b17b

Please sign in to comment.