Skip to content

Commit

Permalink
roachprod: change scp flags to avoid copy via local host
Browse files Browse the repository at this point in the history
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
  • Loading branch information
aliher1911 committed Mar 22, 2023
1 parent 2f821d4 commit 9aa8536
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 9aa8536

Please sign in to comment.