dashboard icon indicating copy to clipboard operation
dashboard copied to clipboard

Uncaught Error: intl string context variable 'docsBase' when creating a cluster after switching the cloud provider to `external`

Open slickwarren opened this issue 2 years ago • 5 comments

Setup

  • Rancher version: 2.8.1
  • Rancher UI Extensions: 2.8.1
  • Browser type & version: firefox v121

Describe the bug

when provisioning an rke1 custom cluster, switching from view as form -> view as yaml and back again broke the k8s version dropdown. Further inspection revealed the following error

Uncaught Error: The intl string context variable 'docsBase' was not provided to the string 'Out-of-tree cloud provider for vsphere is available through the vsphere-csi and vsphere-cpi helm charts. Please refer to the <a href="{docsBase}/cluster-provisioning/rke-clusters/cloud-providers/vsphere/out-of-tree" target="_blank" rel="nofollow noopener noreferrer">docs</a> for installation.'

To Reproduce

  • in rancher, start provisioning a custom rke1 cluster
  • switch the cloud provider option to external
  • click the view as yaml button
  • click the view as form button
  • maybe do this 2x in a row

Result

  • observe the network provider and kubernetes version dropdowns fail to populate
  • also seeing the error invalid semver version <=1.27.x

Expected Result

user should be able to switch between views freely

Screenshots

image

Additional context

not yet tested on 2.9 nor 2.7

slickwarren avatar Jan 30 '24 23:01 slickwarren

Hello,

I encounter the same issue. I tried on a Rancher just upgraded from v2.7.9 and on a fresh install of Rancher v2.8.1. This happens also when I edit a cluster (RKE1) which has cloud provider configured to "out of tree": Kubernetes version drop down is not populated.

ygirerd avatar Feb 01 '24 10:02 ygirerd

The fix is trivial - in lib/shared/addon/components/cluster-driver/driver-rke/component.js, change:

      {{t "cloudProvider.external.vsphereHelpText" htmlSafe=true}}

to

      {{t "cloudProvider.external.vsphereHelpText" docsBase=settings.docsBase htmlSafe=true}}

nwmac avatar Feb 02 '24 09:02 nwmac

Linking SURE-7627

Looks like this affects the edit page of all rke1 clusters with (a custom or wmware driver) and (external cloud provider).

https://github.com/rancher/ui/blob/8efc7f23a7a516afaca2dbefe40ae914e92b73b1/lib/shared/addon/components/cru-cloud-provider/component.js#L210

I've reproduced error by creating a custom RKE1 cluster with an external code provider and then going to edit said cluster.

richard-cox avatar Feb 20 '24 10:02 richard-cox

/backport v2.8.next1

richard-cox avatar Feb 20 '24 13:02 richard-cox

PR https://github.com/rancher/ui/pull/5127 merged so this can be tested, though QA already did test this in 2.8.next1 so I'll defer to them if this needs retesting or automation.

gaktive avatar Mar 15 '24 20:03 gaktive

Tests pass on v2.9-e2023b437f3ccba16169b1e51db18419832ca5d7-head

IsaSih avatar Apr 12 '24 09:04 IsaSih