Skip to content

Commit 924819c

Browse files
michaelklishindumbbell
authored andcommitted
Be more defensive about what output rabbitmqctl eval produces here
OTP 21 has a new logging subsystem and extra logging added to the kernel app to accompany the asynchronous automatic node connection feature. This breaks this eval command that asks the node for some of its effective paths (e.g. the plugin dir). Since we know the set of lines we are interested in, we can filter out everything else. Pair: @dumbbell. Part of #1616. [#157964874] (cherry picked from commit dae785a)
1 parent 48ccd5c commit 924819c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/rabbitmq-env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ if [ "${RABBITMQ_DEV_ENV}" ]; then
292292
"enabled_plugins_file=\"~s\"~n"
293293
"mnesia_base=\"~s\"~n"
294294
"mnesia_dir=\"~s\"~n", [P, E, B, M]).' \
295-
2>/dev/null | head -n 4) || :)
295+
2>/dev/null | grep -E '^(plugins_dir|enabled_plugins_file|mnesia_base|mnesia_dir)=') || :)
296296
if [ "${plugins_dir}" -a \
297297
"$RABBITMQ_PLUGINS_DIR_source" != 'environment' ]; then
298298
RABBITMQ_PLUGINS_DIR="${plugins_dir}"

0 commit comments

Comments
 (0)