From 32f6238698e8eb1a31fa2168c31da67c367063a1 Mon Sep 17 00:00:00 2001 From: Wine93 Date: Fri, 14 Apr 2023 10:45:25 +0800 Subject: [PATCH] Improve(clean): use install instead scp to sync recycle script. --- internal/task/task/common/clean_service.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/internal/task/task/common/clean_service.go b/internal/task/task/common/clean_service.go index 47d031112..825a962e6 100644 --- a/internal/task/task/common/clean_service.go +++ b/internal/task/task/common/clean_service.go @@ -159,12 +159,11 @@ func NewCleanServiceTask(curveadm *cli.CurveAdm, dc *topology.DeployConfig) (*ta recyleScriptPath := utils.RandFilename(TEMP_DIR) if dc.GetKind() == topology.KIND_CURVEBS { - t.AddStep(&step.Scp{ - Content: &recyleScript, - RemotePath: recyleScriptPath, - Mode: 0777, - ExecOptions: curveadm.ExecOptions(), - }) + t.AddStep((&step.InstallFile{ + Content: &recyleScript, + HostDestPath: recyleScriptPath, + ExecOptions: curveadm.ExecOptions(), + })) t.AddStep(&step2RecycleChunk{ dc: dc, clean: clean,