From 44b9724a116d34c95fdf6a7e1e13a8676d65e75d Mon Sep 17 00:00:00 2001 From: xiepaup Date: Tue, 26 Nov 2024 18:06:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(redis):=20=E9=9B=86=E7=BE=A4=E7=B1=BB?= =?UTF-8?q?=E5=9E=8B=E5=8F=98=E6=9B=B4=E6=97=B6=E5=85=88Stop=20dbmon=20#82?= =?UTF-8?q?04?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../atomjobs/atomredis/redis_dts_online_switch.go | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/dbm-services/redis/db-tools/dbactuator/pkg/atomjobs/atomredis/redis_dts_online_switch.go b/dbm-services/redis/db-tools/dbactuator/pkg/atomjobs/atomredis/redis_dts_online_switch.go index 66749e791b..1fe5419c06 100644 --- a/dbm-services/redis/db-tools/dbactuator/pkg/atomjobs/atomredis/redis_dts_online_switch.go +++ b/dbm-services/redis/db-tools/dbactuator/pkg/atomjobs/atomredis/redis_dts_online_switch.go @@ -142,6 +142,11 @@ func (job *RedisDtsOnlineSwitch) Run() (err error) { if err != nil { return err } + // 先Stop dbmon,防止中途被拉起,导致端口冲突 + err = util.StopBkDbmon() + if err != nil { + return err + } err = job.RestartProxyAndCheckBackends() if err != nil { return err @@ -689,11 +694,11 @@ func (job *RedisDtsOnlineSwitch) RestartDbMon() (err error) { return } } - // 重启 dbmon - err = util.StopBkDbmon() - if err != nil { - return err - } + // // 重启 dbmon + // err = util.StopBkDbmon() + // if err != nil { + // return err + // } err = util.StartBkDbmon() if err != nil { return err