Skip to content

Commit

Permalink
Run local checks via RPC
Browse files Browse the repository at this point in the history
This commit changes the run functionality such that when checks
are run on the single-node they are called via RPC to the local
cluster node.

This resolves an issue where the file permissions check would run
using the escript user rather than the dbcore user in single-node
mode.

BugzID: 33731
  • Loading branch information
mikewallace1979 authored and jaydoane committed Apr 19, 2021
1 parent 69defe2 commit 045692f
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/weatherreport/src/weatherreport_runner.erl
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,8 @@
%% @doc Run the supplied list of checks on the local node
-spec run([Module::atom()]) -> [tuple()].
run(Checks) ->
lists:flatten(lists:foldl(fun(Mod, Acc) ->
Node = weatherreport_node:nodename(),
MessagesWithNode = lists:map(fun({Level, Module, Message}) ->
{Node, Level, Module, Message}
end, weatherreport_check:check(Mod, get_check_options())),
[MessagesWithNode | Acc]
end, [], Checks)).
weatherreport_node:can_connect(),
run(Checks, [weatherreport_node:nodename()]).

%% @doc Run the supplied list of checks on the supplied list of cluster nodes
-spec run([Module::atom()], [node()] | all) -> [tuple()].
Expand Down

0 comments on commit 045692f

Please sign in to comment.