!93 Update to stable 2.0.1
From: @cp3yeye Reviewed-by: @Vchanger Signed-off-by: @Vchanger
This commit is contained in:
commit
0358848cc8
Binary file not shown.
BIN
gala-gopher-2.0.1.tar.gz
Normal file
BIN
gala-gopher-2.0.1.tar.gz
Normal file
Binary file not shown.
@ -1,39 +1,39 @@
|
||||
#needsrootforbuild
|
||||
%define __os_install_post %{nil}
|
||||
|
||||
%define without_flamegraph 0
|
||||
%define without_cadvisor 0
|
||||
%define without_jvm 0
|
||||
%define without_tcp 0
|
||||
%define without_systeminfo 0
|
||||
%define without_baseinfo 0
|
||||
%define without_virt 0
|
||||
%define without_opengauss_sli 0
|
||||
%define without_flamegraph 0
|
||||
%define without_l7 0
|
||||
%define without_postgre_sli 0
|
||||
%define without_redis_sli 0
|
||||
%define without_tcp 0
|
||||
%define without_socket 0
|
||||
%define without_io 0
|
||||
%define without_proc 0
|
||||
%define without_jvm 0
|
||||
%define without_postgre_sli 0
|
||||
%define without_opengauss_sli 0
|
||||
%define without_nginx 1
|
||||
%define without_tprofiling 0
|
||||
%define without_kafka 1
|
||||
%define without_hw 1
|
||||
%define without_ksli 0
|
||||
%define without_container 0
|
||||
%define without_sermant 1
|
||||
|
||||
%define disable_kafka_channel 0
|
||||
%define disable_report_event 0
|
||||
%define disable_kafka_channel 0
|
||||
%define disable_flamegraph_svg 0
|
||||
|
||||
# example for tailoring probes
|
||||
%global extend_tailor_probes %{nil}
|
||||
%if 0%{?without_flamegraph}
|
||||
%global extend_tailor_probes %{extend_tailor_probes}stackprobe|
|
||||
%endif
|
||||
%if 0%{?without_jvm}
|
||||
%global extend_tailor_probes %{extend_tailor_probes}jvm.probe
|
||||
%endif
|
||||
|
||||
Summary: Intelligent ops toolkit for openEuler
|
||||
Name: gala-gopher
|
||||
Version: 2.0.0
|
||||
Release: 6
|
||||
Version: 2.0.1
|
||||
Release: 1
|
||||
License: Mulan PSL v2
|
||||
URL: https://gitee.com/openeuler/gala-gopher
|
||||
Source: %{name}-%{version}.tar.gz
|
||||
BuildRoot: %{_builddir}/%{name}-%{version}
|
||||
BuildRequires: systemd cmake gcc-c++ elfutils-devel clang llvm
|
||||
BuildRequires: systemd cmake gcc-c++ elfutils-devel clang llvm bpftool >= 6.8
|
||||
BuildRequires: libconfig-devel libevent-devel openssl-devel libbpf-devel >= 2:0.8 uthash-devel
|
||||
BuildRequires: jsoncpp-devel git libstdc++-devel
|
||||
# for DT
|
||||
@ -52,16 +52,17 @@ BuildRequires: java-1.8.0-openjdk-devel
|
||||
BuildRequires: jsoncpp-devel java-1.8.0-openjdk-devel
|
||||
%endif
|
||||
|
||||
Requires: bash gawk procps-ng glibc elfutils bpftool libbpf >= 2:0.8
|
||||
Requires: bash gawk procps-ng glibc elfutils libbpf >= 2:0.8
|
||||
Requires: libconfig libevent iproute jsoncpp libstdc++
|
||||
|
||||
%if !0%{?disable_kafka_channel}
|
||||
Requires: librdkafka
|
||||
%endif
|
||||
|
||||
%if !0%{?without_systeminfo}
|
||||
%if !0%{?without_baseinfo}
|
||||
Requires: ethtool systemd iproute
|
||||
%endif
|
||||
|
||||
%if !0%{?without_virt}
|
||||
Requires: systemd
|
||||
%endif
|
||||
@ -80,15 +81,12 @@ Requires: libcurl
|
||||
%if !0%{?without_opengauss_sli}
|
||||
Requires: python3-psycopg2 python3-yaml net-tools
|
||||
%endif
|
||||
%if !0%{?without_cadvisor}
|
||||
%if !0%{?without_container}
|
||||
Requires: cadvisor python3-libconf python3-requests net-tools util-linux
|
||||
%endif
|
||||
%if !0%{?without_postgre_sli}
|
||||
Requires: iproute
|
||||
%endif
|
||||
%if !0%{?without_redis_sli}
|
||||
Requires: iproute
|
||||
%endif
|
||||
%if !0%{?without_l7}
|
||||
Requires: jsoncpp conntrack-tools
|
||||
%endif
|
||||
@ -96,7 +94,6 @@ Requires: jsoncpp conntrack-tools
|
||||
Requires: lsof
|
||||
%endif
|
||||
|
||||
Patch1: metric_total_size-may-be-a-float.patch
|
||||
|
||||
%description
|
||||
gala-gopher is a low-overhead eBPF-based probes framework
|
||||
@ -106,20 +103,30 @@ gala-gopher is a low-overhead eBPF-based probes framework
|
||||
|
||||
|
||||
%build
|
||||
cat << EOF > tailor.conf
|
||||
EXTEND_PROBES="%{extend_tailor_probes}"
|
||||
EOF
|
||||
|
||||
BUILD_OPTS=(
|
||||
%if !0%{?disable_kafka_channel}
|
||||
-DKAFKA_CHANNEL=1
|
||||
%else
|
||||
-DKAFKA_CHANNEL=0
|
||||
%endif
|
||||
-DENABLE_BASEINFO=%[0%{?without_baseinfo}?0:1]
|
||||
-DENABLE_VIRT=%[0%{?without_virt}?0:1]
|
||||
|
||||
%if !0%{?disable_flamegraph_svg}
|
||||
-DFLAMEGRAPH_SVG=1
|
||||
%endif
|
||||
-DENABLE_FLAMEGRAPH=%[0%{?without_flamegraph}?0:1]
|
||||
-DENABLE_L7=%[0%{?without_l7}?0:1]
|
||||
-DENABLE_TCP=%[0%{?without_tcp}?0:1]
|
||||
-DENABLE_SOCKET=%[0%{?without_tcp}?0:1]
|
||||
-DENABLE_IO=%[0%{?without_io}?0:1]
|
||||
-DENABLE_PROC=%[0%{?without_proc}?0:1]
|
||||
-DENABLE_JVM=%[0%{?without_jvm}?0:1]
|
||||
-DENABLE_POSTGRE_SLI=%[0%{?without_postgre_sli}?0:1]
|
||||
-DENABLE_OPENGAUSS_SLI=%[0%{?without_opengauss_sli}?0:1]
|
||||
-DENABLE_NGINX=%[0%{?without_nginx}?0:1]
|
||||
-DENABLE_TPROFILING=%[0%{?without_tprofiling}?0:1]
|
||||
-DENABLE_KAFKA=%[0%{?without_kafka}?0:1]
|
||||
-DENABLE_HW=%[0%{?without_hw}?0:1]
|
||||
-DENABLE_KSLI=%[0%{?without_ksli}?0:1]
|
||||
-DENABLE_CONTAINER=%[0%{?without_cadvisor}?0:1]
|
||||
-DENABLE_SERMANT=%[0%{?without_sermant}?0:1]
|
||||
|
||||
-DENABLE_REPORT_EVENT=%[0%{?disable_report_event}?0:1]
|
||||
-DKAFKA_CHANNEL=%[0%{?disable_kafka_channel}?0:1]
|
||||
-DFLAMEGRAPH_SVG=%[0%{?disable_flamegraph_svg}?0:1]
|
||||
)
|
||||
|
||||
pushd build
|
||||
@ -172,9 +179,8 @@ fi
|
||||
%attr(0550,root,root) %{_bindir}/*
|
||||
%attr(0550,root,root) /opt/gala-gopher/extend_probes/*
|
||||
%attr(0640,root,root) /opt/gala-gopher/meta/*
|
||||
%attr(0640,root,root) /opt/gala-gopher/btf/*
|
||||
#%attr(0640,root,root) /opt/gala-gopher/btf/*
|
||||
%attr(0550,root,root) /opt/gala-gopher/lib/*
|
||||
%attr(0640,root,root) /etc/gala-gopher/res/event_multy_language.rc
|
||||
%attr(0640,root,root) %config(noreplace) /etc/gala-gopher/probes.init
|
||||
%attr(0640,root,root) %config(noreplace) /etc/gala-gopher/*.conf
|
||||
%attr(0640,root,root) %config(noreplace) /etc/gala-gopher/extend_probes/*.conf
|
||||
@ -182,6 +188,9 @@ fi
|
||||
%attr(0550,root,root) /usr/libexec/gala-gopher/init_probes.sh
|
||||
|
||||
%changelog
|
||||
* Wed Apr 24 2024 Tangxin Xie <xietangxin@huawei.com> - 2.0.0-1
|
||||
- Update to 2.0.1
|
||||
|
||||
* Mon Apr 15 2024 Liping Hu <huliping10@huawei.com> - 2.0.0-6
|
||||
- metric_total_size may be negative or float
|
||||
|
||||
|
||||
@ -1,127 +0,0 @@
|
||||
From 1cc0b1dd266ed0792e8ef096bcdeadd26050cc16 Mon Sep 17 00:00:00 2001
|
||||
From: hlp_00667687 <huliping10@huawei.com>
|
||||
Date: Mon, 15 Apr 2024 20:10:19 +0800
|
||||
Subject: [PATCH] metric_total_size may be a float
|
||||
|
||||
---
|
||||
src/lib/config/config.c | 28 ++++++++++++++--------------
|
||||
1 file changed, 14 insertions(+), 14 deletions(-)
|
||||
|
||||
diff --git a/src/lib/config/config.c b/src/lib/config/config.c
|
||||
index de74602..4a8795f 100644
|
||||
--- a/src/lib/config/config.c
|
||||
+++ b/src/lib/config/config.c
|
||||
@@ -216,7 +216,7 @@ static int ConfigMgrLoadKafkaConfig(void *config, config_setting_t *settings)
|
||||
KafkaConfig *kafkaConfig = (KafkaConfig *)config;
|
||||
uint32_t ret = 0;
|
||||
const char *strVal = NULL;
|
||||
- uint32_t intVal = 0;
|
||||
+ int intVal = 0;
|
||||
|
||||
ret = config_setting_lookup_string(settings, "kafka_broker", &strVal);
|
||||
if (ret == 0) {
|
||||
@@ -226,7 +226,7 @@ static int ConfigMgrLoadKafkaConfig(void *config, config_setting_t *settings)
|
||||
(void)snprintf(kafkaConfig->broker, sizeof(kafkaConfig->broker), "%s", strVal);
|
||||
|
||||
ret = config_setting_lookup_int(settings, "batch_num_messages", &intVal);
|
||||
- if (ret == 0) {
|
||||
+ if (ret == 0 || intVal <= 0) {
|
||||
ERROR("[CONFIG] load config for batch.num.messages failed.\n");
|
||||
return -1;
|
||||
}
|
||||
@@ -240,21 +240,21 @@ static int ConfigMgrLoadKafkaConfig(void *config, config_setting_t *settings)
|
||||
(void)snprintf(kafkaConfig->compressionCodec, sizeof(kafkaConfig->compressionCodec), "%s", strVal);
|
||||
|
||||
ret = config_setting_lookup_int(settings, "queue_buffering_max_messages", &intVal);
|
||||
- if (ret == 0) {
|
||||
+ if (ret == 0 || intVal <= 0) {
|
||||
ERROR("[CONFIG] load config for queue.buffering.max.messages failed.\n");
|
||||
return -1;
|
||||
}
|
||||
kafkaConfig->queueBufferingMaxMessages = intVal;
|
||||
|
||||
ret = config_setting_lookup_int(settings, "queue_buffering_max_kbytes", &intVal);
|
||||
- if (ret == 0) {
|
||||
+ if (ret == 0 || intVal <= 0) {
|
||||
ERROR("[CONFIG] load config for queue.buffering.max.kbytes failed.\n");
|
||||
return -1;
|
||||
}
|
||||
kafkaConfig->queueBufferingMaxKbytes = intVal;
|
||||
|
||||
ret = config_setting_lookup_int(settings, "queue_buffering_max_ms", &intVal);
|
||||
- if (ret == 0) {
|
||||
+ if (ret == 0 || intVal <= 0) {
|
||||
ERROR("[CONFIG] load config for queue.buffering.max.ms failed.\n");
|
||||
return -1;
|
||||
}
|
||||
@@ -267,31 +267,31 @@ static int ConfigMgrLoadIMDBConfig(void *config, config_setting_t *settings)
|
||||
{
|
||||
IMDBConfig *imdbConfig = (IMDBConfig *)config;
|
||||
uint32_t ret = 0;
|
||||
- uint32_t intVal = 0;
|
||||
+ int intVal = 0;
|
||||
|
||||
ret = config_setting_lookup_int(settings, "max_tables_num", &intVal);
|
||||
- if (ret == 0) {
|
||||
+ if (ret == 0 || intVal <= 0) {
|
||||
ERROR("[CONFIG] load config for imdbConfig max_tables_num failed.\n");
|
||||
return -1;
|
||||
}
|
||||
imdbConfig->maxTablesNum = intVal;
|
||||
|
||||
ret = config_setting_lookup_int(settings, "max_records_num", &intVal);
|
||||
- if (ret == 0) {
|
||||
+ if (ret == 0 || intVal <= 0) {
|
||||
ERROR("[CONFIG] load config for imdbConfig max_records_num failed.\n");
|
||||
return -1;
|
||||
}
|
||||
imdbConfig->maxRecordsNum = intVal;
|
||||
|
||||
ret = config_setting_lookup_int(settings, "max_metrics_num", &intVal);
|
||||
- if (ret == 0) {
|
||||
+ if (ret == 0 || intVal <= 0) {
|
||||
ERROR("[CONFIG] load config for imdbConfig max_metrics_num failed.\n");
|
||||
return -1;
|
||||
}
|
||||
imdbConfig->maxMetricsNum = intVal;
|
||||
|
||||
ret = config_setting_lookup_int(settings, "record_timeout", &intVal);
|
||||
- if (ret == 0) {
|
||||
+ if (ret == 0 || intVal <= 0) {
|
||||
ERROR("[CONFIG] load config for imdbConfig record_timeout failed, use default setting instead.\n");
|
||||
} else {
|
||||
imdbConfig->recordTimeout = intVal;
|
||||
@@ -308,7 +308,7 @@ static int ConfigMgrLoadWebServerConfig(void *config, config_setting_t *settings
|
||||
int intVal = 0;
|
||||
|
||||
ret = config_setting_lookup_int(settings, "port", &intVal);
|
||||
- if (ret == 0) {
|
||||
+ if (ret == 0 || intVal <= 0) {
|
||||
ERROR("[CONFIG] load config for webServerConfig port failed.\n");
|
||||
return -1;
|
||||
}
|
||||
@@ -370,7 +370,7 @@ static int ConfigMgrLoadRestServerConfig(void *config, config_setting_t *setting
|
||||
(void)snprintf(restServerConfig->bindAddr, sizeof(restServerConfig->bindAddr), "%s", strVal);
|
||||
|
||||
ret = config_setting_lookup_int(settings, "port", &intVal);
|
||||
- if (ret == 0) {
|
||||
+ if (ret == 0 || intVal <= 0) {
|
||||
ERROR("[CONFIG] load config for restServerConfig port failed.\n");
|
||||
return -1;
|
||||
}
|
||||
@@ -414,10 +414,10 @@ static int ConfigMgrLoadLogsConfig(void *config, config_setting_t *settings)
|
||||
LogsConfig *logsConfig = (LogsConfig *)config;
|
||||
uint32_t ret = 0;
|
||||
const char *strVal = NULL;
|
||||
- uint32_t intVal = 0;
|
||||
+ int intVal = 0;
|
||||
|
||||
ret = config_setting_lookup_int(settings, "metric_total_size", &intVal);
|
||||
- if (ret == 0) {
|
||||
+ if (ret == 0 || intVal <= 0) {
|
||||
ERROR("[CONFIG] load config for metric_total_size failed.\n");
|
||||
return -1;
|
||||
}
|
||||
--
|
||||
2.28.0.windows.1
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user