@cryptotaxi247 / netdata-1 / commits / c857c880f

Don't install eBPF plugin components when they shouldn't be installed (#9844)

Vladimir Kobal committed Aug 31, 2020 at 16:01 UTC c857c880f31a89b7857bf01f1f48227c41bf8a93
2 files changed +14 -1
configure.ac
+7
@@ -167,6 +167,12 @@ AC_ARG_ENABLE(
167 ,
168 [enable_jsonc="detect"]
169 )
170 +AC_ARG_ENABLE(
171 + [ebpf],
172 + [AS_HELP_STRING([--disable-ebpf], [Disable eBPF support @<:@default autodetect@:>@])],
173 + ,
174 + [enable_ebpf="detect"]
175 +)
176
177 # -----------------------------------------------------------------------------
178 # Check if cloud is enabled and if the functionality is available
@@ -968,6 +974,7 @@ AC_CHECK_FILE(
974
975 AC_MSG_CHECKING([if ebpf.plugin should be enabled])
976 if test "${build_target}" = "linux" -a \
977 + "${enable_ebpf}" != "no" -a \
978 "${have_libelf}" = "yes" -a \
979 "${have_bpf}" = "yes" -a \
980 "${have_libbpf}" = "yes"; then
netdata-installer.sh
+7 -1
@@ -299,7 +299,7 @@ while [ -n "${1}" ]; do
299 "--disable-telemetry") NETDATA_DISABLE_TELEMETRY=1 ;;
300 "--disable-go") NETDATA_DISABLE_GO=1 ;;
301 "--enable-ebpf") NETDATA_DISABLE_EBPF=0 ;;
302 - "--disable-ebpf") NETDATA_DISABLE_EBPF=1 ;;
302 + "--disable-ebpf") NETDATA_DISABLE_EBPF=1 NETDATA_CONFIGURE_OPTIONS="${NETDATA_CONFIGURE_OPTIONS//--disable-ebpf/} --disable-ebpf" ;;
303 "--disable-cloud")
304 if [ -n "${NETDATA_REQUIRE_CLOUD}" ]; then
305 echo "Cloud explicitly enabled, ignoring --disable-cloud."
@@ -1435,6 +1435,12 @@ should_install_ebpf() {
1435 return 1
1436 fi
1437
1438 + if [ "$(uname -s)" != "Linux" ]; then
1439 + run_failed "Currently eBPF is only supported on Linux."
1440 + defer_error "Currently eBPF is only supported on Linux."
1441 + return 1
1442 + fi
1443 +
1444 # Check Kernel Config
1445 if ! run "${INSTALLER_DIR}"/packaging/check-kernel-config.sh; then
1446 echo >&2 "Warning: Kernel unsupported or missing required config (eBPF may not work on your system)"