From 9b38cce90a43a9f6c6fad5a953d5b8b4950ed7cd Mon Sep 17 00:00:00 2001 From: Wangjunqi123 Date: Fri, 1 Dec 2023 15:51:41 +0800 Subject: [PATCH] modify configuration file name in server and agent --- agent/conf/config.go | 2 +- scripts/PilotGo-plugin-topology.spec | 8 ++++---- server/conf/config.go | 2 +- server/service/background/initdb.go | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/agent/conf/config.go b/agent/conf/config.go index c7a97150..4d232151 100644 --- a/agent/conf/config.go +++ b/agent/conf/config.go @@ -26,7 +26,7 @@ type ServerConfig struct { Logopts *logger.LogOpts `yaml:"log"` } -const config_type = "config_agent.yaml" +const config_type = "topo_agent.yaml" var Config_dir string diff --git a/scripts/PilotGo-plugin-topology.spec b/scripts/PilotGo-plugin-topology.spec index 369b9fc7..5b4e2877 100644 --- a/scripts/PilotGo-plugin-topology.spec +++ b/scripts/PilotGo-plugin-topology.spec @@ -44,21 +44,21 @@ GO111MODULE=on go build -mod=vendor -o PilotGo-plugin-topology-agent main.go %install # server install -D -m 0755 server/PilotGo-plugin-topology-server %{buildroot}/opt/PilotGo/plugin/topology/server/PilotGo-plugin-topology-server -install -D -m 0644 conf/config_server.yaml.templete %{buildroot}/opt/PilotGo/plugin/topology/server/config_server.yaml +install -D -m 0644 conf/topo_server.yaml.templete %{buildroot}/opt/PilotGo/plugin/topology/server/topo_server.yaml install -D -m 0644 scripts/PilotGo-plugin-topology-server.service %{buildroot}/usr/lib/systemd/system/PilotGo-plugin-topology-server.service # agent install -D -m 0755 agent/PilotGo-plugin-topology-agent %{buildroot}/opt/PilotGo/plugin/topology/agent/PilotGo-plugin-topology-agent -install -D -m 0644 conf/config_agent.yaml.templete %{buildroot}/opt/PilotGo/plugin/topology/agent/config_agent.yaml +install -D -m 0644 conf/topo_agent.yaml.templete %{buildroot}/opt/PilotGo/plugin/topology/agent/topo_agent.yaml install -D -m 0644 scripts/PilotGo-plugin-topology-agent.service %{buildroot}/usr/lib/systemd/system/PilotGo-plugin-topology-agent.service %files server /opt/PilotGo/plugin/topology/server/PilotGo-plugin-topology-server -/opt/PilotGo/plugin/topology/server/config_server.yaml +/opt/PilotGo/plugin/topology/server/topo_server.yaml /usr/lib/systemd/system/PilotGo-plugin-topology-server.service %files agent /opt/PilotGo/plugin/topology/agent/PilotGo-plugin-topology-agent -/opt/PilotGo/plugin/topology/agent/config_agent.yaml +/opt/PilotGo/plugin/topology/agent/topo_agent.yaml /usr/lib/systemd/system/PilotGo-plugin-topology-agent.service %changelog diff --git a/server/conf/config.go b/server/conf/config.go index 3dc35d7b..806769f3 100644 --- a/server/conf/config.go +++ b/server/conf/config.go @@ -42,7 +42,7 @@ type ServerConfig struct { Prometheus *PrometheusConf `yaml:"prometheus"` } -const config_type = "config_server.yaml" +const config_type = "topo_server.yaml" var Config_dir string diff --git a/server/service/background/initdb.go b/server/service/background/initdb.go index 8641cc43..eb223dd2 100644 --- a/server/service/background/initdb.go +++ b/server/service/background/initdb.go @@ -18,7 +18,7 @@ func InitDB() { case "otherDB": default: - err := errors.Errorf("unknown database in config_server.yaml: %s **fatal**4", conf.Global_config.Topo.GraphDB) // err top + err := errors.Errorf("unknown database in topo_server.yaml: %s **fatal**4", conf.Global_config.Topo.GraphDB) // err top agentmanager.Topo.ErrCh <- err agentmanager.Topo.Errmu.Lock() agentmanager.Topo.ErrCond.Wait() -- Gitee