Skip to content

Commit

Permalink
Merge #99283
Browse files Browse the repository at this point in the history
99283: roachprod: change scp flags to avoid copy via local host r=tbg a=aliher1911

Previously default scp option made it to copy files via local host. This was causing unnecessary delays and network usage because files were first copied to one node, then distributed from that node using scp between remote locations. Unfortunately the default scp behaviour is to fetch from src and put to dst to avoid authenticating from src to dst.
This commit adds scp options to do direct copy.

Fixes: #99103

Release note: None

Co-authored-by: Oleg Afanasyev <oleg@cockroachlabs.com>
  • Loading branch information
craig[bot] and aliher1911 committed Mar 23, 2023
2 parents 77ab217 + 9aa8536 commit b1f889e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/roachprod/install/cluster_synced.go
Original file line number Diff line number Diff line change
Expand Up @@ -2381,7 +2381,9 @@ func (c *SyncedCluster) SSH(ctx context.Context, l *logger.Logger, sshArgs, args
// which we do want to be able to retry.
func scp(src, dest string) (*RunResultDetails, error) {
args := []string{
"scp", "-r", "-C",
"scp",
// ssh to src then scp dsc mode, use agent forwarding, recursive, compression
"-R", "-A", "-r", "-C",
"-o", "StrictHostKeyChecking=no",
}
args = append(args, sshAuthArgs()...)
Expand Down

0 comments on commit b1f889e

Please sign in to comment.