adoptium / infrastructure

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

Prepare playbooks for Ubuntu 20.04 (LTS) #1226

Closed sxa closed 4 years ago

sxa commented 4 years ago

While 20.04 is not out til next month, we can still acquire the pre-release ISO install images and validate the playbooks and make any necessary adjustments based on those

Haroon-Khel commented 4 years ago

Was able to get an instance of the x86 image running in virtual box.

Currently the only tasks that are failing are the docker and installing the packages g++-4.8, gcc-4.8 via apt. Naturally, I skipped the adoptopenjdk tasks.

Will investigate these failing tasks

Haroon-Khel commented 4 years ago

The docker tasks fail on name: Add Docker Repo for Ubuntu x86_64. There is currently no Docker repository for Focal (in the source from which ansible pulls anyway), hence the task fails

sxa commented 4 years ago

That's good - if everything else is good that means it fundamentally works and we should be ok. Great news if nothing else is needed, and it'll work when the repository is updated :-)

Might be worth running a test build of e.g. OpenJ9/JDK11 with makejdk-any-plattorm.sh to verify that it works ok with the results of the playbook.

Haroon-Khel commented 4 years ago

JDK8 and 9 failed to build, giving gmake errors. Not sure if this is related to gcc-4.8 not installing via apt

Haroon-Khel commented 4 years ago

A build of JDK11u with openj9, using the command ./makejdk-any-platform.sh -J /usr/lib/jvm/jdk-10.0.2+13/ --build-variant openj9 jdk11u failed with the following error

cc1plus: all warnings being treated as errors
gmake[3]: *** [CoreLibraries.gmk:166: /root/openjdk-build/workspace/build/src/build/linux-x86_64-normal-server-release/support/native/java.base/libjimage/imageFile.o] Error 1
gmake[2]: *** [make/Main.gmk:219: java.base-libs] Error 2

ERROR: Build failed for targets 'product-images legacy-jre-image test-image debug-image' in configuration 'linux-x86_64-normal-server-release' (exit code 2) 

=== Output from failing command(s) repeated here ===
* For target support_native_java.base_libjimage_imageFile.o:
In file included from /usr/include/string.h:495,
                 from ../src/java.base/share/native/libjimage/imageFile.cpp:33:
In function ‘char* strncpy(char*, const char*, size_t)’,
    inlined from ‘void ImageFileReader::location_path(ImageLocation&, char*, size_t) const’ at ../src/java.base/share/native/libjimage/imageFile.cpp:502:16:
/usr/include/x86_64-linux-gnu/bits/string_fortified.h:106:34: error: ‘char* __builtin_strncpy(char*, const char*, long unsigned int)’ output truncated before terminating nul copying as many bytes from a string as its length [-Werror=stringop-truncation]
  106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
      |          ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/java.base/share/native/libjimage/imageFile.cpp: In member function ‘void ImageFileReader::location_path(ImageLocation&, char*, size_t) const’:
../src/java.base/share/native/libjimage/imageFile.cpp:497:24: note: length computed here
  497 |         length = strlen(module);
      |                  ~~~~~~^~~~~~~~
In file included from /usr/include/string.h:495,
                 from ../src/java.base/share/native/libjimage/imageFile.cpp:33:
In function ‘char* strncpy(char*, const char*, size_t)’,
    inlined from ‘void ImageFileReader::location_path(ImageLocation&, char*, size_t) const’ at ../src/java.base/share/native/libjimage/imageFile.cpp:514:16:
   ... (rest of output omitted)

* All command lines available in /root/openjdk-build/workspace/build/src/build/linux-x86_64-normal-server-release/make-support/failure-logs.
=== End of repeated output ===

No indication of failed target found.
Hint: Try searching the build log for '] Error'.
Hint: See doc/building.html#troubleshooting for assistance.

make[1]: *** [/root/openjdk-build/workspace/build/src/make/Init.gmk:305: main] Error 2
make: *** [/root/openjdk-build/workspace/build/src/make/Init.gmk:186: product-images] Error 2

@sxa Do you think this may be related to the machine's inability to install gcc-4.8 and g++4.8?

sxa commented 4 years ago

NOTE: I'm sxa555 on github, not sxa

No, gcc 4.8 should not be used at all on the OpenJ9 builds - it should only be using gcc 7 and if it is requiring 4.8 directly I'd consider that a bug :-)

That's not an error I've seen before. It's not impossible that it is a temporary issue with the OpenJ9 codebase. Can you try with --configure-args --disable-warnings-as-errors on the makejdk-any-platform.sh line (and if that doesn't work, let me know if a hotspot build works instead of openj9

Haroon-Khel commented 4 years ago

With --configure-args --disable-warnings-as-errors the build was able to succeed

sxa commented 4 years ago

Sounds good - we use that in the main builds so that means it's all good - looking forward to getting some real machines to run the testing on once 20.04 has been released (April 23rd is when it's currently scheduled for)

sxa commented 4 years ago

Playbooks are currently still attempting to install gcc-4.8 which is listed in the Ubuntu Common role variables.

Likewise we should probably replace docker-ce with docker.io from the main Ubuntu repositories in order to get that installed too.

sxa commented 4 years ago

NTP role is failing on ubuntu 20.04 as well. @sej-jackson you had to make updates to the way NTP was done for RHEL8 - do you know if the same changes are valid for Ubuntu 20.04?

Haroon-Khel commented 4 years ago

@sxa The NTP role fails at name: Set timedatectl set-ntp no, which simply runs the command timedatectl set-ntp no. According to manpages, this is equivalent to disabling the systemd-timesyncd service. It seems that this service is disabled on Ubuntu 20.04 by default, and running the Unix playbook doesnt change this. The remaining tasks of the NTP role run fine.

Therefore would it be sufficient to skip only this failing task for Ubuntu 20.04? (Or equally, add a sperate task to ensure that the systemd-timesyncd service is disabled)

sxa commented 4 years ago

Let's add a separate task to ensure the operations are consistent across distros. We can't be sure what state any cloud provider will have the machines in initially. As long as the ntp service is starting properly by later tasks that should be good.

Haroon-Khel commented 4 years ago

Closing as the issues with the failing roles have been resolved