summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVladimir Kobal <vlad@prokk.net>2020-08-31 16:01:59 +0300
committerGitHub <noreply@github.com>2020-08-31 16:01:59 +0300
commitc857c880f31a89b7857bf01f1f48227c41bf8a93 (patch)
treec67b81b9e3aaceea1cd7b817910814e9761c0f6d
parent8ae0a356ffe07418334be51907f2886d64b1255b (diff)
Don't install eBPF plugin components when they shouldn't be installed (#9844)
-rw-r--r--configure.ac7
-rwxr-xr-xnetdata-installer.sh8
2 files changed, 14 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index b3ff4ba785..190f3cd50a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -167,6 +167,12 @@ AC_ARG_ENABLE(
,
[enable_jsonc="detect"]
)
+AC_ARG_ENABLE(
+ [ebpf],
+ [AS_HELP_STRING([--disable-ebpf], [Disable eBPF support @<:@default autodetect@:>@])],
+ ,
+ [enable_ebpf="detect"]
+)
# -----------------------------------------------------------------------------
# Check if cloud is enabled and if the functionality is available
@@ -968,6 +974,7 @@ AC_CHECK_FILE(
AC_MSG_CHECKING([if ebpf.plugin should be enabled])
if test "${build_target}" = "linux" -a \
+ "${enable_ebpf}" != "no" -a \
"${have_libelf}" = "yes" -a \
"${have_bpf}" = "yes" -a \
"${have_libbpf}" = "yes"; then
diff --git a/netdata-installer.sh b/netdata-installer.sh
index eba7f1be9c..e7392f472c 100755
--- a/netdata-installer.sh
+++ b/netdata-installer.sh
@@ -299,7 +299,7 @@ while [ -n "${1}" ]; do
"--disable-telemetry") NETDATA_DISABLE_TELEMETRY=1 ;;
"--disable-go") NETDATA_DISABLE_GO=1 ;;
"--enable-ebpf") NETDATA_DISABLE_EBPF=0 ;;
- "--disable-ebpf") NETDATA_DISABLE_EBPF=1 ;;
+ "--disable-ebpf") NETDATA_DISABLE_EBPF=1 NETDATA_CONFIGURE_OPTIONS="${NETDATA_CONFIGURE_OPTIONS//--disable-ebpf/} --disable-ebpf" ;;
"--disable-cloud")
if [ -n "${NETDATA_REQUIRE_CLOUD}" ]; then
echo "Cloud explicitly enabled, ignoring --disable-cloud."
@@ -1435,6 +1435,12 @@ should_install_ebpf() {
return 1
fi
+ if [ "$(uname -s)" != "Linux" ]; then
+ run_failed "Currently eBPF is only supported on Linux."
+ defer_error "Currently eBPF is only supported on Linux."
+ return 1
+ fi
+
# Check Kernel Config
if ! run "${INSTALLER_DIR}"/packaging/check-kernel-config.sh; then
echo >&2 "Warning: Kernel unsupported or missing required config (eBPF may not work on your system)"