MINOR: stream: report the current rule in "show sess all" when known

Sometimes an HTTP or TCP rule may take time to complete because it is
waiting for external data (e.g. "wait-for-body", "do-resolve"), and it
can be useful to report the action and the location of that rule in
"show sess all". Here for streams blocked on such a rule, there will
now be a "current_line" extra line reporting this. Note that this does
not catch rulesets which are re-evaluated from the start on each change
(e.g. tcp-request content waiting for changes) but only when a specific
rule is being paused.
This commit is contained in:
Willy Tarreau 2021-10-11 09:49:03 +02:00
parent c9e4868510
commit 1274e10d5c

View File

@ -3421,6 +3421,11 @@ static int stats_dump_full_strm_to_buffer(struct stream_interface *si, struct st
(unsigned long long)htx->extra);
}
if (strm->current_rule_list && strm->current_rule) {
const struct act_rule *rule = strm->current_rule;
chunk_appendf(&trash, " current_rule=\"%s\" [%s:%d]\n", rule->kw->kw, rule->conf.file, rule->conf.line);
}
if (ci_putchk(si_ic(si), &trash) == -1)
goto full;