-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
roachprod: ensure scp uses supported flags #99430
Conversation
We're already in the process of reverting that change (#99419) so tonight's run should be safe. If we want to conditionally use it like proposed here, let's first make sure that:
|
I looked at
and thinking if we need to include bsd family here? Or just keep "darwin" and be done with it? |
Do we otherwise test and support |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for fixing my sloppy engineering!
"-o", "StrictHostKeyChecking=no", | ||
} | ||
if runtime.GOOS == "darwin" { | ||
args = append(args, []string{"-R", "-A"}...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't we just do
args = append(args, "-R", "-A")
I actually dug a bit further by accident and figured that flags are supported by openssl 9 and not supported by openssl 7. Ubuntu/Debian that we use and I also have on one server have v7, while macos have 9 and I also have arch which is also using 9 and has all the flags. So it is not bsd specific. Ideally we should just check version, but I don't think there's an easy way beside doing something like |
Good catch! It failed on my gceworker and TeamCity and succeeded on OSX so I jumped to the wrong conclusion 🙂 It should be possible to parse the version relatively easily with |
83a5603
to
f151d17
Compare
In cockroachdb#99283 the flags `-R -A` were added to the `scp` command invocation, in order to ensure that copies between two remote hosts are done without transferring to the localhost. These flags are only supported on MacOS (`"darwin"`) and not on Linux, as this behavior is already the default on Linux. This change fixes that issue by only using these flags on MacOS, allowing the `scp` invocation (and by extension, roachprod) to work on Linux. Epic: none Release note: None
f151d17
to
2785011
Compare
bors r+ |
I added this as a TODO but wanted to merge this fix for now. |
Build succeeded: |
In #99283 the flags
-R -A
were added to thescp
command invocation, in order to ensure that copies between two remote hosts are done without transferring to the localhost. These flags are only supported on MacOS ("darwin"
) and not on Linux, as this behavior is already the default on Linux. This change fixes that issue by only using these flags on MacOS, allowing thescp
invocation (and by extension, roachprod) to work on Linux.Epic: none
Release note: None