sous-chefs / java

Development repository for the java cookbook
https://supermarket.chef.io/cookbooks/java
Apache License 2.0
386 stars 637 forks source link

Resource adoptopenjdk_install failing for AdoptOpenJDK 8 OpenJ9 on 6.0.0 #590

Closed joaoafonso11 closed 4 years ago

joaoafonso11 commented 4 years ago

Cookbook version

6.0.0

Chef-client version

15.8.23

Platform Details

Using Test Kitchen platforms:

Scenario:

Install AdoptOpenJDK on test VM

Steps to Reproduce:

Using the following attributes:

default['java']['jdk_version'] = '8'
default['java']['install_flavor'] = 'adoptopenjdk'

Expected Result:

AdoptOpenJDK version 8 should be installed

Actual Result:

From chef-client log:

      Recipe: java::adoptopenjdk
         * adoptopenjdk_install[adoptopenjdk] action install
           * directory[/usr/lib/jvm] action create
             - create new directory /usr/lib/jvm
             - change mode from '' to '0755'
             - change owner from '' to 'root'
             - change group from '' to 'root'
             - restore selinux security context
           * remote_file[/tmp/kitchen/cache/OpenJDK8U-jdk_x64_linux_openj9_8u232b09_openj9-0.17.0.tar.gz] action create_if_missing
             - create new file /tmp/kitchen/cache/OpenJDK8U-jdk_x64_linux_openj9_8u232b09_openj9-0.17.0.tar.gz
             - update content in file /tmp/kitchen/cache/OpenJDK8U-jdk_x64_linux_openj9_8u232b09_openj9-0.17.0.tar.gz from none to abea75
             (file sizes exceed 10000000 bytes, diff output suppressed)
             - change mode from '' to '0644'
             - restore selinux security context
           * yum_package[tar] action install (up to date)
       [2020-03-05T05:02:48+00:00] FATAL:  Command ' mv "/tmp/kitchen/cache/jdk-0.17+0" "/usr/lib/jvm/jdk-0.17+0-openj9" ' failed

AdoptOpenJDK 10 and 11 or variant HotSpot work without issue. Only failing when using AdoptOpenJDK 8 OpenJ9 variant.

damacus commented 4 years ago

I don't know if you've seen it, but we have a Pr in the wings waiting for fix the AdoptOpenJDK install recipe.

We're changing it to a resource and adding loads more testing: #589, and deprecating the recipe usage so you have more control and feedback from the resource. That should get merged in, in the next day or so 👍