Skip to content
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

[5.14.14] redhat: download failure for JDK 8 #78

Closed
Petenerd opened this issue Mar 1, 2018 · 6 comments
Closed

[5.14.14] redhat: download failure for JDK 8 #78

Petenerd opened this issue Mar 1, 2018 · 6 comments

Comments

@Petenerd
Copy link

Petenerd commented Mar 1, 2018

The version isn't getting set correctly and it leads to a download page that has auth.

"http://download.oracle.com/otn/java/jdk/8u152-b16/aa0333dd3019491ca4f6ddbe78cdb6d0/jdk-8u152-linux-x64.rpm"

https:/ansiblebit/oracle-java/blob/master/tasks/redhat/main.yml#L14 only has regex that looks for version 9

@steenzout steenzout added the bug label Mar 1, 2018
@steenzout
Copy link
Member

@Petenerd can you use 5.14.12 in the meantime?

@Petenerd
Copy link
Author

Petenerd commented Mar 1, 2018

Yeah - we got around it by pinning to that, I just wanted to raise the issue - so you guys were aware

@wawrzek
Copy link

wawrzek commented May 25, 2018

And it seems that version 9 is not on the page anymore.

@guwi17
Copy link

guwi17 commented Jun 26, 2018

The current version (5.14.14) has two problems:

  1. the regex to find download URLs does not work
  2. the target directory is wrong

For 1) a possible fix is to relax the version number:

# see tasks/redhat/main.yml
- name: determine latest java download page and version
  set_fact: latest_java_page_and_version="{{ (result.content.replace('\n','')|regex_replace('.*(/technetwork/java/javase/downloads/jdk([0-9]+)-downloads.*?.html).*', 'http://www.oracle.com/\1\n\2')).split('\n') }}"

For 2) either revert 680d5703502ef22046070f28ebcce972f736495a or compute it dependent of oracle_java_version

update: I'd appreciate continued support of JDK8 because the environment where I use this module will stick on JDK8 for some time ...

@steenzout
Copy link
Member

steenzout commented Aug 19, 2018

I've removed the logic to try and capture the latest download URL from the Oracle page (more trouble to maintain that it is worth).

I've got a new beta version of this role in the develop branch.

These will be the variables you will be able to set for RedHat distributions:

  • oracle_java_dir_source: directory where to store the RPM files (default: /usr/local/src).
  • oracle_java_rpm_filename: file name used for the download destination (default: jdk-10.0.2_linux-x64_bin.rpm).
  • oracle_java_home: the location of the Java home directory (default: /usr/java/default).
  • oracle_java_download_url: where to download the rpm from (default: http://download.oracle.com/otn-pub/java/jdk/10.0.2+13/19aef61b38124481863b1413dce1855f/jdk-10.0.2_linux-x64_bin.rpm).
  • oracle_java_download_timeout: download timeout, in seconds (default: 60).
  • oracle_java_rpm_validate_certs: flag to indicate if you want SSL certificate validation (default: yes).

hopefully, this should give everyone the flexibility to pick whatever version they want.

I'll close this ticket when 6.20.0 is released.

if you test the branch, please let me know on this thread.

@steenzout steenzout added the fix label Aug 19, 2018
@steenzout steenzout self-assigned this Aug 19, 2018
@steenzout steenzout changed the title 5.14.14 Breaks JDK 8 download [5.14.14] redhat: download failure for JDK 8 Aug 19, 2018
@steenzout
Copy link
Member

fixed on https:/ansiblebit/oracle-java/releases/tag/6.22.0.

please report any new problems you may find.

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants