Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into config-file
Browse files Browse the repository at this point in the history
Signed-off-by: lucklove <gnu.crazier@gmail.com>
  • Loading branch information
lucklove committed Aug 26, 2020
2 parents ef364e8 + 104839b commit 7e9f5e1
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion components/dm/spec/grafana.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func (i *GrafanaInstance) installDashboards(e executor.Executor, deployDir, clus
return errors.AddStack(err)
}

cmd := fmt.Sprintf(`tar -xzf %s -C %s && rm %s`, dstPath, tmp, dstPath)
cmd := fmt.Sprintf(`tar --no-same-owner -zxf %s -C %s && rm %s`, dstPath, tmp, dstPath)
_, stderr, err = e.Execute(cmd, false)
if err != nil {
return errors.Annotatef(err, "stderr: %s", string(stderr))
Expand Down
2 changes: 1 addition & 1 deletion components/dm/spec/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func (i *MonitorInstance) installRules(e executor.Executor, deployDir, clusterVe
return errors.AddStack(err)
}

cmd := fmt.Sprintf(`tar -xzf %s -C %s && rm %s`, dstPath, tmp, dstPath)
cmd := fmt.Sprintf(`tar --no-same-owner -zxf %s -C %s && rm %s`, dstPath, tmp, dstPath)
_, stderr, err = e.Execute(cmd, false)
if err != nil {
return errors.Annotatef(err, "stderr: %s", string(stderr))
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/operation/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func GetNodeInfo(
}

// get node info by exec _telemetry node_info at remote instance.
cmd := fmt.Sprintf(`tar -xzf %s -C %s && rm %s`, dstPath, dstDir, dstPath)
cmd := fmt.Sprintf(`tar --no-same-owner -zxf %s -C %s && rm %s`, dstPath, dstDir, dstPath)
_, stderr, err := exec.Execute(cmd, false)
if err != nil {
return errors.Annotatef(err, "stderr: %s", string(stderr))
Expand Down
2 changes: 1 addition & 1 deletion pkg/cluster/task/install_package.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func (c *InstallPackage) Execute(ctx *Context) error {
return errors.Annotatef(err, "failed to scp %s to %s:%s", c.srcPath, c.host, dstPath)
}

cmd := fmt.Sprintf(`tar -xzf %s -C %s && rm %s`, dstPath, dstDir, dstPath)
cmd := fmt.Sprintf(`tar --no-same-owner -zxf %s -C %s && rm %s`, dstPath, dstDir, dstPath)

_, stderr, err := exec.Execute(cmd, false)
if err != nil {
Expand Down

0 comments on commit 7e9f5e1

Please sign in to comment.