Add support to new kernels (#8192)
* netdata_kernels_extensions: Add support to new kernels This commit brings the missing kernels for netdata-installer.sh * netdata_kernels_extensions: Adjust kernel versions * netdata_kernels_extensions: Missing bar There was a missing bar in the ln command
thiagoftsm committed
Feb 26, 2020 at 20:19 UTC
c2246ff2325fdb3b7dbccbd75252d08c7fbb116f
1 file changed
+18
-9
netdata-installer.sh
+18
-9
@@ -1111,20 +1111,29 @@ get_compatible_kernel_for_ebpf() {
1111
1112
# XXX: Logic taken from Slack discussion in #ebpf
1113
# everything that has a version <= 4.14 can use the code built to 4.14
1114
- # Continue the logic, everything that has a version <= 4.19 and >= 4.15 can use the code built to 4.19
1114
+ # also all distributions that has a version <= 4.15.256 can use the code built to 4.15
1115
+ # Continue the logic, everything that has a version < 4.19.102 and >= 4.15 can use the code built to 4.19
1116
+ # Kernel 4.19 had a feature added in the version 4.19.102 that force us to break it in two, so version >= 4.19.102
1117
+ # and smaller than < 5.0 runs with code built to 4.19.102
1118
# Finally, everybody that is using 5.X can use what is compiled with 5.4
1119
1120
kpkg=
1121
1122
if [ "${kver}" -ge 005000000 ]; then
1120
- echo >&2 " Using eBPF Kernel Package built against Linux 5.4"
1121
- kpkg="5_4"
1122
- elif [ "${kver}" -ge 004015000 ] && [ "${kver}" -le 004020017 ]; then
1123
- echo >&2 " Using eBPF Kernel Package built against Linux 4.19"
1124
- kpkg="4_19"
1123
+ echo >&2 " Using eBPF Kernel Package built against Linux 5.4.20"
1124
+ kpkg="5_4_20"
1125
+ elif [ "${kver}" -ge 004019102 ] && [ "${kver}" -le 004020017 ]; then
1126
+ echo >&2 " Using eBPF Kernel Package built against Linux 4.19.104"
1127
+ kpkg="4_19_104"
1128
+ elif [ "${kver}" -ge 004016000 ] && [ "${kver}" -le 004020017 ]; then
1129
+ echo >&2 " Using eBPF Kernel Package built against Linux 4.19.98"
1130
+ kpkg="4_19_98"
1131
+ elif [ "${kver}" -ge 004015000 ] && [ "${kver}" -le 004015256 ]; then
1132
+ echo >&2 " Using eBPF Kernel Package built against Linux 4.15.18"
1133
+ kpkg="4_15_18"
1134
elif [ "${kver}" -le 004014999 ]; then
1126
- echo >&2 " Using eBPF Kernel Package built against Linux 4.14"
1127
- kpkg="4_14"
1135
+ echo >&2 " Using eBPF Kernel Package built against Linux 4.14.171"
1136
+ kpkg="4_14_171"
1137
else
1138
echo >&2 " ERROR: Cannot detect a supported kernel on your system!"
1139
return 1
@@ -1241,7 +1250,7 @@ install_ebpf() {
1250
run cp -a -v "${tmp}/libnetdata_ebpf.so" "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d"
1251
run cp -a -v "${tmp}"/pnetdata_ebpf_process.o "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d"
1252
run cp -a -v "${tmp}"/rnetdata_ebpf_process.o "${NETDATA_PREFIX}/usr/libexec/netdata/plugins.d"
1244
- run ln -v -f -s "${libdir}"/libbpf_kernel.so "${libdir}"libbpf_kernel.so.0
1253
+ run ln -v -f -s "${libdir}"/libbpf_kernel.so "${libdir}"/libbpf_kernel.so.0
1254
run ldconfig
1255
1256
echo >&2 "ePBF installation all done!"