Skip to content

Commit

Permalink
Improve(clean): use install instead scp to sync recycle script.
Browse files Browse the repository at this point in the history
  • Loading branch information
Wine93 committed Apr 18, 2023
1 parent e6ed0b6 commit 32f6238
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions internal/task/task/common/clean_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 32f6238

Please sign in to comment.