Open nnoethling opened 4 days ago
It sounds like there have been changes made to the struct on the rancher side that are out of sync with the non-builtin driver. For example the field on the rancher MachineConfig
object is now an array, but the OutscaleConfig
object expects a string... or vice versa. Perhaps these drivers need to be updated to support rancher 2.9?
We should investigate if this will affect partners with node drivers as well. For whoever picks this up, raise it in the team slack channel for details
For outscale the UI uses the shell/machine-config/generic.vue
component to render the form for node details. It creates the form given fields provided by shell/store/plugins.js
fieldsForDriver
. Pre 2.9.0 this looked at the node drivers resourceFields
, however from 2.9.0 these come from a new schemaDefinition
endpoint.
The endpoint returns extraTagsAll of type "string".
Outscale driver side it looks like that should be an array, see https://github.com/outscale/docker-machine-driver-outscale/blob/ed1caed0714f42d4f339430741c76269f9f7b24a/pkg/drivers/outscale/outscale.go#L63 (need to confirm how this somehow gets to be a schema rke-machine-config.cattle.io.outscaleconfig).
I think there was an issue with schemaDefinition and nested arrays, however i think from memory standard arrays (i.e. string[]) were fine. Checking with @MbolotSuse
In 2.9.0 the issue in https://github.com/rancher/dashboard/issues/11936#issuecomment-2361435906 was resolved by https://github.com/rancher/rancher/issues/45157.
However in 2.9.1 it's still an issue. ~investigating now.~ This is a UI bug that doesn't handle the new resourceField format for supplying an array shell/components/Questions/index.vue
componentForQuestion
checks for a type starting with array[
, which is now array. Need to also confirm the type is correctly picked up
/backport v2.9.3
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
extraTagsAll
orsecurityGroupIds
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:
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:
extraTagsAll field in Cluster create in Rancher 2.8.5 is for multiple values with Add button:
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)