Skip to content

Add -L flag to curl in scripts/get-flatcar to follow redirects.#1551

Open
bugre wants to merge 1 commit into
poseidon:mainfrom
bugre:fix/flatcar-download-url-now-redirects
Open

Add -L flag to curl in scripts/get-flatcar to follow redirects.#1551
bugre wants to merge 1 commit into
poseidon:mainfrom
bugre:fix/flatcar-download-url-now-redirects

Conversation

@bugre
Copy link
Copy Markdown

@bugre bugre commented Mar 3, 2026

Flatcar downloads from '[channel].flatcar-linux.net' now redirect (302) to 'flatcar.cdn.cncf.io/[channel]', so to still point the base url to flatcar's own domain, adding the '-L' ( '--location' ) will allow the script correctly get the needed files.


$ curl -sI https://stable.release.flatcar-linux.net/amd64-usr/current/version.txt
HTTP/2 302
alt-svc: h3=":443"; ma=2592000
cache-control: max-age=300
location: https://flatcar.cdn.cncf.io/stable/amd64-usr/4459.2.3/version.txt
server: Caddy
date: Tue, 03 Mar 2026 20:40:04 GMT

Needed as downloads from 'channel.flatcar-linux.net' now redirect (302) to 'flatcar.cdn.cncf.io/channel'.
@bjwschaap
Copy link
Copy Markdown

Hi @bugre I actually was about to create an issue + PR for the exact same thing. Also, it would be nice to add an $ARCH variable/parameter to be able to select aarch64/arm64 next to the x64/amd64. If you like I can put my version in a Gist as a reference, instead of us both creating a PR for the same thing...

@bjwschaap
Copy link
Copy Markdown

@bugre
Copy link
Copy Markdown
Author

bugre commented May 25, 2026

Hi @bjwschaap,
Adding the support for a optional "ARCH" flag to the two 'get' scripts isn't much related to the fix of curl following redirects i would suggest a separated PR, as usually maintainers prefer not mixing different issues in the same PR ( @dghubble ) ?.

I'll be away for a few days, when i'm back i could pull the upstream changes into my fork and try adding your diff to it.
I did a quick check and it seems that the second gist:

named get-fedora-coreos, actually also has the content of 'get-flatcar'.

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