rancher / dashboard

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

[backport v2.9.3] Cannot create Clusters in 2.9.1 using non-builtin Node drivers #11983

Open github-actions[bot] opened 3 weeks ago

github-actions[bot] commented 3 weeks ago

This is a backport issue for #11936, automatically created via GitHub Actions workflow initiated by @richard-cox

Original issue body:

Setup

Describe the bug

In the current stable Rancher version 2.9.1 Cluster creation is not working using non-builtin drivers. UI is shown the following Error when trying to create the cluster: OutscaleConfig.rke-machine-config.cattle.io "nc-outscale-test-pool1-wshzr" is invalid: extraTagsAll: Invalid value: "string": extraTagsAll in body must be of type array: "string"

To Reproduce

  1. Deploy Rancher 2.9.1
  2. Enable Non-builtin Node driver (e.g. Outscale in my example)
  3. Go to Clusters and create new Cluster
  4. Make sure RKE2/K3s is enabled
  5. Select outscale as node driver
  6. Enter a cluster name
  7. Enter dummy values for extraTagsAll or securityGroupIds
  8. Click Create

Result Cluster create is blocked by UI error: OutscaleConfig.rke-machine-config.cattle.io "nc-outscale-test-pool1-wshzr" is invalid: extraTagsAll: Invalid value: "string": extraTagsAll in body must be of type array: "string"

The actual Network Request response:

{
    "type": "error",
    "links": {},
    "code": "Invalid",
    "message": "OutscaleConfig.rke-machine-config.cattle.io \"nc-outscale-test-pool1-pt54k\" is invalid: extraTagsAll: Invalid value: \"string\": extraTagsAll in body must be of type array: \"string\"",
    "status": 422,
    "type": "error"
}

Expected Result

Creation of Cluster is possible using the UI.

Screenshots

extraTagsAll field in Cluster create in Rancher 2.9.1 seems to be a field for a string:

image

extraTagsAll field in Cluster create in Rancher 2.8.5 is for multiple values with Add button:

image

Additional context

Seems like in Rancher 2.9.1 UI array fields from custom UI are not processed correctly, or atleast other than in previous versions of Rancher. If you have a look at the custom UI code of the Driver (e.g. for outscale: https://oos.eu-west-2.outscale.com/rancher-ui-driver-outscale/v0.2.0/component.js) all fields that are arrays are affected and will not be displayed as array in Rancher UI. This only seems to affect non-builtin Drivers. I tested with 3 different ones (Outscale, Nutanix and Cloudscale)

IsaSih commented 5 days ago

I could not find the field extraTagsAll in the cluster creation form. Would you mind to provide more details on the user flow to get to this field, please?

richard-cox commented 3 days ago

@IsaSih The repo steps in the description should work (for outscale).

extraTagsAll is a field in the Machine Pool config

image