rancher / dashboard

The Rancher UI
https://rancher.com
Apache License 2.0
463 stars 261 forks source link

Cannot upgrade from k3s 1.20.15 to 1.21.14 in UI #7880

Closed gaktive closed 1 year ago

gaktive commented 1 year ago

Internal reference: SURE-5759 Reported in 2.6.9

Issue description: When attempting to upgrade a k3s cluster through the UI, there is no option for k3s 1.21.14 (or any 1.21.x version). Options are v1.22.16, 1.23.14, and 1.24.8. Currently running 1.20.15 and need to upgrade to 1.21.14 since minor version upgrades are not supposed to jump 2 minor versions. This makes it difficult to upgrade.

Repro steps:

Workaround: Go to the older (/g) UI and use view in API for cluster and manually change the k3s version through API call. Or use the rancher2 terraform provider to upgrade.

Actual behavior: v1.21.14+k3s1 is NOT listed in the Kubernetes Version drop down

Expected behavior: v1.21.14+k3s1 is listed in the Kubernetes Version drop down

Additional notes: Note: according to support matrix for v2.6.9, k3s 1.20 -> 1.24 is supported. See https://www.suse.com/suse-rancher/support-matrix/all-supported-versions/rancher-v2-6-9/

image-2023-01-05-13-31-30-064.png

k3s team has indicated that there's no change on the KDM side made, so 1.21 though deprecated, should appear. The theory is that the Show Deprecated Versions checkbox isn't appearing properly.

Quoting:

We made rke2 and k3s v1.21 have a max rancher version of v2.6.4 in https://github.com/rancher/rancher/issues/37547, and then later we added the “Show Deprecated Versions” checkbox through https://github.com/rancher/dashboard/issues/6376, which I believe should cover k3s as well even though it wasn't explicitly tested in that issue. The reason v1.21 does not show up in rancher v2.6.9 is because KDM specifies the maximum rancher version for all of the v1.21 line to be rancher v2.6.4 per https://github.com/rancher/kontainer-driver-metadata/blob/release-v2.6/channels.yaml#L176-L182.

I'm not sure if the "Show Deprecated Versions" checkbox that was added for this specifically applies to Imported and Local k3s and rke2 clusters, but based on this ticket it appears it doesn't. I believe that is the fix that is needed here.

gaktive commented 1 year ago

Backend has a ticket already tied to this: https://github.com/rancher/rancher/issues/38500

Closing this as a duplicate.