PyratLabs / ansible-role-k3s

Ansible role for installing k3s as either a standalone server or HA cluster.
BSD 3-Clause "New" or "Revised" License
640 stars 135 forks source link

Parsing the latest version is failing #227

Closed abelfodil closed 1 month ago

abelfodil commented 2 months ago

Summary

Ensure the release version is set as a fact step is failing due to error {"msg": "'dict object' has no attribute 'json'"}.

Upon inspection of https://update.k3s.io/v1-release/channels, it seems the json format is not respected anymore when headers are supplied.

e.g. running curl --header "Accept: application/json" https://update.k3s.io/v1-release/channels yields an HTML page with JS code.

Issue Type

Steps to Reproduce

Set k3s_release_version: v1.29 which will trigger the pre-checks and run into the issue.

Expected Result

The precheck step should pass.

Actual Result

The precheck step fails.

Fix

A possible fix is to not check the version at all and instead use the following links:

abelfodil commented 2 months ago

Issue is now fixed. Feel free to close if you think long-term action is not needed.

dbrennand commented 2 months ago

Hi @abelfodil - I don't think there is anything for us to action here. I see that https://update.k3s.io/v1-release/channels is protected by Cloudflare and I suspect your request was being blocked by Cloudflare at the time.