BUG/MEDIUM: opentracing: initialization before establishing daemon and/or chroot...
authorMiroslav Zagorac <mzagorac@haproxy.com>
Wed, 9 Jun 2021 23:23:15 +0000 (01:23 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 10 Jun 2021 04:45:39 +0000 (06:45 +0200)
commit9425ed488f4d31db07f0c9b1e8b2f0fb65b18c7b
tree589698603cdf46abec52bea4b259f38f948baa4c
parent164247405451abb6b7644fc9927e184892257f10
BUG/MEDIUM: opentracing: initialization before establishing daemon and/or chroot mode

This patch solves the problem reported in github issue #1204, where the
OpenTracing filter cannot communicate with the selected tracer if HAProxy
is run in daemon mode.

This commit also solves github issue #1274, where the problem manifests
itself when using the 'chroot' keyword in the HAProxy configuration.

This is solved so that the initialization of the OpenTracing plugin is
split into two operations, first the plugin (dynamic library) is loaded
before switching the HAProxy to daemon mode (or chroot) and then the
tracer thread is started.

This means that nothing is retrieved from the file system in runtime.

After applying this commit, opentracing C wrapper version 1.1.0 should be
used because the earlier version does not have separated initialization
functions.

This resolves GitHub issues #1204 and #1274.
addons/ot/include/conf.h
addons/ot/include/opentracing.h
addons/ot/src/conf.c
addons/ot/src/filter.c
addons/ot/src/opentracing.c
addons/ot/src/parser.c