adoptium / infrastructure

This repo contains all information about machine maintenance.
Apache License 2.0
85 stars 101 forks source link

test-packet-x64-windows-2012r2-1 seems to have broken cygwin setup #1023

Closed jerboaa closed 4 years ago

jerboaa commented 4 years ago

From https://ci.adoptopenjdk.net/view/Test_upstream/job/Test_openjdk11_hs_sanity.openjdk_x86-64_windows_upstream/30/console

Fails with:

12:39:55  ./openjdk-tests/get.sh: line 14: $'\r': command not found
12:39:55  ./openjdk-tests/get.sh: line 15: set: -
: invalid option
12:39:55  set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]
12:39:55  ./openjdk-tests/get.sh: line 16: $'\r': command not found
12:39:55  ./openjdk-tests/get.sh: line 35: $'\r': command not found
12:39:55  ./openjdk-tests/get.sh: line 36: $'\r': command not found
12:39:55  ./openjdk-tests/get.sh: line 37: syntax error near unexpected token `$'\r''
12:39:55  ./openjdk-tests/get.sh: line 37: `usage ()

Line 14 of get.sh is an empty line. Perhaps missing cygwin on that machine? Note that the box had labels sw.os.win over sw.os.windows which prevented it from getting any jobs. Maybe that was intentional? Anyway, a better way would be to get it properly set up.

Thanks!

AdamBrousseau commented 4 years ago

See https://github.com/AdoptOpenJDK/openjdk-infrastructure/issues/378#issuecomment-412581791

jerboaa commented 4 years ago

Looks like #378 didn't fully resolve this?

smlambert commented 4 years ago

FYI @sxa555 - we are seeing same problem on windows machines that Sej set up (using Adopt ansible playbooks) on the internal svt team Jenkins server

sxa commented 4 years ago

Hmm the default git install from the playbooks ought to be ok, but the fix I put onto that particular machines was to run this through the script console to ensure it takes effect for the jenkins user. If it's still an issue with newly provisioned machines we need to check the installation steps we're using and/or do something to add that after jenkins user creation (or add it to the test scripts!)

git config --global core.autocrlf input

It will be interesting to see if @Willsparker sees this when he gets to the testing phase of his Vagrant playbook testing, so I'll assign to him in case there are further updates required on this ...

llxia commented 4 years ago

I also hit this machine in Grinder and it does not seem to have curl installed.

https://ci.adoptopenjdk.net/view/Test_grinder/job/Grinder/1386/console

09:41:36  curl -OLJSks  https://api.adoptopenjdk.net/v2/binary/nightly/openjdk8?openjdk_impl=openj9&os=windows&arch=x64&release=latest&type=jdk&heap_size=normal
09:41:36  curl error code: 127. Sleep 300 secs, then retry 1...

127 - command not found from https://stackoverflow.com/questions/1763156/127-return-code-from

Could someone disable this machine for now? Thanks

jerboaa commented 4 years ago

Same here: https://ci.adoptopenjdk.net/view/Test_upstream/job/Test_openjdk8_hs_sanity.system_x86-64_windows_upstream/21/console

20:11:31  get jdk binary...
20:11:31  curl -OLJSks  https://github.com/AdoptOpenJDK/openjdk8-upstream-binaries/releases/download/jdk8u242-b04/OpenJDK8U-jdk_x64_windows_8u242b04_ea.zip
20:11:31  curl error code: 127. Sleep 300 secs, then retry 1...
smlambert commented 4 years ago

I have marked https://ci.adoptopenjdk.net/computer/test-packet-x64-windows-2012r2-1/ with a note to refer to this issue for the reason.

Willsparker commented 4 years ago

This looks an awful lot like the issue that was on the test-azure-win2012r2 machines : https://github.com/AdoptOpenJDK/openjdk-infrastructure/issues/627#issuecomment-450893688

So, the line endings are causing the issue with the testing, as they're being converted when git cloning the repository. I don't believe I will see this issue with my vagrant testing as this line is executed when building a JDK on a Windows vagrant VM: https://github.com/AdoptOpenJDK/openjdk-infrastructure/blob/836917d8a89b697101ac1cdf24a072a11cb4fc88/ansible/pbTestScripts/buildJDKWin.sh#L10

However, I'll see if this does fix the issue and update :-)

sxa commented 4 years ago

We need to stop overriding things like that in the playbook test scripts as it means we're masking issues with the playbooks ;-)

@Willsparker Can you implement something using the options referred to in https://github.com/git-for-windows/git/wiki/Silent-or-Unattended-Installation to ensure that this works out of the box going forward please?

sxa commented 4 years ago

@llxia @jerboaa It's definitely not that it doesn't have curl installed. The fact that it says "curl error core" means that it managed to start curl so it isn't the shell saying it's not found ...

It looks like every time I try rto run anything with curl it just dumps me back at the command line so I'm not quite sure what's going on with that (unrelated to the crlf problem though I believe)

sxa commented 4 years ago

Upgrading curl within cygwin from 7.59.0-1 to 7.66.0-1 seems to have fixed the curl issue

Willsparker commented 4 years ago

@sxa555 Does the test machine use git-for-windows to git clone the tests repository, or does it use cygwin's? If the former, then we can go down the route of adding a task to the Windows Playbook that creates the parameter file and then use it in installation. Otherwise, then we can just add a task after the cygwin install that runs the line in my playbook-test scripts.

AdamBrousseau commented 4 years ago

I can speak for the machines at the Eclipse OpenJ9 farm and internally. We use Cygwin Git not Git for Windows.

Willsparker commented 4 years ago

Thanks @AdamBrousseau . I've decided I'm just going to put a fix in for both of them as I can't see any benefit necessarily to having git change the line endings in our situation.

sxa commented 4 years ago

@Willsparker Do we believe we've resolved all issues on this box now?

Willsparker commented 4 years ago

The playbooks have been updated now so in the future the boxes should be setup correctly. I haven't done anything to fix specifically this machine.

sxa commented 4 years ago

Have removed strawberry perl from the machine (well, it's been renamed) as per https://github.com/AdoptOpenJDK/openjdk-build/issues/1445#issuecomment-568473730 so assuming https://ci.adoptopenjdk.net/view/Test_openjdk/job/Test_openjdk11_hs_sanity.openjdk_x86-64_windows/107/ passes I'm going to close this on the basis that it appears to be working well now.

sxa commented 4 years ago

There's a jdk_lang test failure but the job has run through unlike before so hopefully that's good enough - we can re-open if necessary