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

make Java install resilient #878

Closed
mstormi opened this issue May 9, 2020 · 15 comments · Fixed by #993
Closed

make Java install resilient #878

mstormi opened this issue May 9, 2020 · 15 comments · Fixed by #993
Labels
enhancement New feature or request java Related to java

Comments

@mstormi
Copy link
Contributor

mstormi commented May 9, 2020

Following up on #874, there is a need to make (first & foremost but not exclusively) Java install more resilient.

Need to consider both a short term and a strategic approach in parallel.

On short term, we need to evaluate the list of available packages and select hf ones.
@ecdye I didn't have the time to dissect this in detail at 2am so may be wrong, but unlike what you wrote in #874 the URL OHian requested returned MORE than one package and your code seemed to select the last out of those. So it was bad luck that that was the sf one. Double-check that please
and eventually come up with a (non-hot) fix.

On strategic, see #655. I stand by my opinion to keep copies of latest packages known to be good
(= have a copy in openhabian repo). That we should do at least for Azul and Adopt Java.
[NOTE: we may need to have several copies for different HW architectures]

Mind #692: given AC's 'tie break' that took place there, I'd like to get this implemented asap.
It means we'll have a new "stable" branch in addition to today's master branch.
What it means for this issue here is that changed Java install code should evaluate the branch first and if in 'stable', it should download the known good package off the openHABian repo.
Also mind the connection to #825 (offline install), our image would need to contain a copy as well for that to work. So even with Inet available, on the system is the first place place the code should look for.
If in master it should continue to retrieve the package directly from the source, BUT it should be extended to fall back to the repo cache if the install routine can determine that downloading from source fails or is bad somehow [it obviously cannot detect all instances of 'bad' such as the aarch32sf one, but it can detect some of them].

PS: we should duplicate this approach for other external sources once it has proven to work
PPS: there would have been a chance to spot #874 early: actually all test builds made since the Azul change were failing.

@mstormi mstormi pinned this issue May 9, 2020
@mstormi mstormi assigned mstormi and unassigned mstormi May 9, 2020
@mstormi mstormi added this to the Refinement and Refocus milestone May 9, 2020
@ecdye
Copy link
Member

ecdye commented May 9, 2020

The builds started failing about two days ago. We could have caught it but I was busy trying to get RL things done and wasn't paying enough attention to make the connection.

What you did to fix it should suffice in all cases except when Azul is in the middle of uploading their latest builds and the hf build is not available. That seems to be a very low chance. I am hoping to get Azul to fix it, but if that doesn't work then I'll work on making static link workarounds for when the API fails to return the correct binary.

@mstormi
Copy link
Contributor Author

mstormi commented May 9, 2020

The builds started failing about two days ago. We could have caught it but I was busy [...] and wasn't paying enough attention to make the connection

Same for me. But relying on that is a broken concept. Maintainers cannot be on duty 24x7, 365 days a year. Hence my focus on a strategic approach to mitigate the need for fast reaction.

What you did to fix it should suffice in all cases except

Ok, then skip looking for a final fix and move on to the strategic approach I raised.

@ecdye
Copy link
Member

ecdye commented May 10, 2020

My one worry about keeping local copies is that then we can run into licensing issues with the packages that we include.

@mstormi
Copy link
Contributor Author

mstormi commented May 10, 2020

For Zulu Community the Azul website says you can "download and use without restrictions".
[Note: IIRC in the code we use names "Enterprise" and "Embedded" which is wrong as that's the commercial versions. Code we use is the free "Community" however.]
For that, I have not even found an own (Community) licensing file. Links found on g**gling are forwarded to https://www.azul.com/products/zulu-and-zulu-enterprise/zulu-terms-of-use/ which
I would say our use case should be in line with.

Adopt license is Apache 2.0 https://github.com/AdoptOpenJDK/openjdk-build/blob/master/LICENSE which should be fine as well (same as for the Balena sources).

If anyone finds information to deviate, please point me there.

@ecdye
Copy link
Member

ecdye commented May 12, 2020

@mstormi would it be better to consolidate #879 into this issue and make this a thread to track and address all Java issues relating to Zulu?

@mstormi
Copy link
Contributor Author

mstormi commented May 12, 2020

For the sake of tracking, no as it's completely different issues.
But any PR can be the fix to several issues at once so just feel free to fix them in one go.

@ecdye
Copy link
Member

ecdye commented May 12, 2020

I would but right now I'm more or less in hurry up and wait mode for a fix from Azul.

@mstormi
Copy link
Contributor Author

mstormi commented May 15, 2020

FYI The latest Raspbian (lite) image that is available for download includes Oracle JDK and other packages that require licensing. For their handling see here

@ecdye
Copy link
Member

ecdye commented May 15, 2020

Do we need to worry about the licensing?

@mstormi
Copy link
Contributor Author

mstormi commented May 15, 2020

what do you mean ? because we in turn include Raspbian ?

@ecdye
Copy link
Member

ecdye commented May 15, 2020

Yeah

@mstormi
Copy link
Contributor Author

mstormi commented May 16, 2020

I think we should leave a reference on the download page like the Raspbian guys did.

@holgerfriedrich holgerfriedrich added java Related to java enhancement New feature or request labels May 22, 2020
@mstormi
Copy link
Contributor Author

mstormi commented May 31, 2020

Would you say we're done with this ?

@mstormi mstormi unpinned this issue May 31, 2020
@ecdye
Copy link
Member

ecdye commented May 31, 2020

Yes, until such a time that Azul gets back to me with a proper fix we are done with this.

@mstormi mstormi closed this as completed May 31, 2020
ecdye added a commit to ecdye/openhabian that referenced this issue Jun 21, 2020
Additonally fix Java installation output.

Fixes openhab#878
Fixes openhab#879

Signed-off-by: Ethan Dye <[email protected]>
ecdye added a commit to ecdye/openhabian that referenced this issue Jun 21, 2020
Additionally fix Java installation output.

Fixes openhab#878
Fixes openhab#879

Signed-off-by: Ethan Dye <[email protected]>
ecdye added a commit to ecdye/openhabian that referenced this issue Jun 21, 2020
Additionally fix Java installation output.

Fixes openhab#878
Fixes openhab#879

Signed-off-by: Ethan Dye <[email protected]>
mstormi pushed a commit that referenced this issue Jun 23, 2020
Additionally fix Java installation output.

Fixes #878
Fixes #879

Signed-off-by: Ethan Dye <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request java Related to java
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants