Closed jiaqiluo closed 2 years ago
Maybe the logic for determining which versions should be marked as Experimental for imported clusters is different, need input from UI team on this.
This test indicates that the bug is NOT related to the fact that none of the minor versions which are the same as the latest version defined in the KDM is available for rancher v2.6.3.
Steps:
v1.22.5+rke2r2
is the default and is available in 2.6.3rke2 1.21.9-rke2r1
clusterResult: 1.22.x are marked as experimental
This is indeed a non-issue as for imported cluster Ember UI is used and "experimental" label is added by the following code: https://github.com/rancher/ui/blob/86aaea0ef9fc54c23f3bc8bb8cb69108062a109c/lib/shared/addon/components/managed-import-cluster-info/component.js#L86
This is driven by supported k8s versions range set in ui-k8s-supported-versions-range
setting provided by Rancher backend which in turn is calculated on the fly based on KDM data per https://github.com/rancher/rancher/blob/364f746bb650057e74dd385db96873bed2adcd73/pkg/controllers/management/kontainerdrivermetadata/data.go#L682
From my understanding this calculation is done based on versions that are already filtered based on version-constrained configuration in KDM, e.g. like this for 2.6.3: https://github.com/rancher/kontainer-driver-metadata/blob/a11d25f5ba6f0d114ac366236969c5e0497d1304/rke/k8s_version_info.go#L35
Closing this issue based on this research.
cc: @jiaqiluo @kinarashah @catherineluse
Setup
Describe the bug
When editing an imported RKE2 cluster, Default versions are marked as experimental in the dropdown list of versions. This bug happens in a very specific scenario, please see the following steps for reproducing.
To Reproduce
rke-metadata-config
to point to a customized fork of the KDM.{"refresh-interval-minutes":"1440","url":"https://github.com/jiaqiluo/kontainer-driver-metadata/raw/dashboard-5409/data/data.json"}
Result
We can see that all 1.22.x versions are marked as experimental. However, if we go to the cluster-creation page, we can see that the default version is 1.22.7+rke2r1
More Info (Update: this assumption is not correct. see https://github.com/rancher/dashboard/issues/5409#issuecomment-1072783562) This bug might be related to the fact that none of the minor versions which are the same as the latest version defined in the KDM is available for rancher v2.6.3:
As the following shows,
v1.23.4+rke2r2
is the latest version defined in the KDMHowever,
v1.23.4+rke2r2
is not available for rancher v2.6.3 because of its minChannelServerVersionAlso,
v1.23.4+rke2r2
is the only existing 1.23.x version. As the result, the UI shows 1.22.7+rke2r1 as the default version because it is the highest available version below 1.23.4+rke2r2 in rancher 2.6.3Here is the file defines the rules for RKE2 that is used to generate the KDM for this issue: https://github.com/jiaqiluo/kontainer-driver-metadata/blob/dashboard-5409/channels-rke2.yaml