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

HDDS-11767. Use closer.lua in Ozone images #34

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

adoroszlai
Copy link
Contributor

What changes were proposed in this pull request?

Most Ozone images download binaries from dlcdn. They cannot be rebuilt after old releases are removed from mirrors. Replace the URL with one that is supposed to work for both new and old binaries.

Also, extract version number to argument to reduce duplication.

https://issues.apache.org/jira/browse/HDDS-11767

How was this patch tested?

Version that is currently mirrored:

$ curl -L --head "https://www.apache.org/dyn/closer.lua?action=download&filename=ozone/1.4.0/ozone-1.4.0.tar.gz"
HTTP/2 302 
...
location: https://dlcdn.apache.org/ozone/1.4.0/ozone-1.4.0.tar.gz
...

HTTP/2 200 
...
content-length: 482009796
...

Archived version:

curl -L --head "https://www.apache.org/dyn/closer.lua?action=download&filename=ozone/1.3.0/ozone-1.3.0.tar.gz"
HTTP/2 302 
...
location: https://archive.apache.org/dist/ozone/1.3.0/ozone-1.3.0.tar.gz
...

HTTP/1.1 200 OK
...
Content-Length: 427860880
...

CI build:
https://github.com/adoroszlai/ozone-docker/actions/runs/11947909528/job/33304613875#step:7:442

@adoroszlai adoroszlai self-assigned this Nov 21, 2024
@adoroszlai adoroszlai requested a review from smengcl November 21, 2024 07:28
@adoroszlai
Copy link
Contributor Author

Also tested by applying d1bb3b6 with runner version updated to 20241121-1-jdk11 (the one from apache/ozone-docker-runner@0b0afa1), and the current change on top of ozone-1.3.0-rocky and earlier branches:

  • 1.3.0: ghcr.io/adoroszlai/ozone:f84fcfea84161f2ff0dc64ceca15e5c71349c795
  • 1.2.1: ghcr.io/adoroszlai/ozone:98a3ce8536469c9f9d11e239b4ed8ae53283261e
  • 1.1.0: ghcr.io/adoroszlai/ozone:02f00d86a6307373a74751cc96fc3826b031f8d0
  • 1.0.0: ghcr.io/adoroszlai/ozone:60af14c585424793f08aa233fde785d753b6d0fa

Copy link

@smengcl smengcl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm. Thanks @adoroszlai .

btw are dlcdn.apache.org and archive.apache.org the only two possible domains closer.lua can redirect to?

@adoroszlai
Copy link
Contributor Author

Thanks @smengcl for the review.

btw are dlcdn.apache.org and archive.apache.org the only two possible domains closer.lua can redirect to?

There used to be multiple mirrors, but they were "aggregated" into dlcdn.

@adoroszlai adoroszlai merged commit 69ef5c4 into apache:latest Nov 21, 2024
1 check passed
@adoroszlai adoroszlai deleted the HDDS-11767 branch November 21, 2024 19:11
@smengcl
Copy link

smengcl commented Nov 21, 2024

Thanks @adoroszlai for the explanation.

I bumped into the prod source code for closer.lua here:

https://github.com/apache/infrastructure-p6/blob/production/modules/closer_cgi/files/closer.lua#L57

Looks like downloads.apache.org is also being used in some case, but I am not so sure.

adoroszlai added a commit that referenced this pull request Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants