rancher / dashboard

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

Allow provisioning Vsphere RKE2 DS clusters with duplicate networks names #9817

Open gaktive opened 9 months ago

gaktive commented 9 months ago

Internal reference: SURE-6853 & SURE-6177

Request description: A user uses VMWare as infrastructure to provision rke2 downstream clusters. The Vsphere Distributed Switches, VDS, get networks from NSX-T. There is only one Transport zone so all VDS get the same networks, therefore network names are duplicated.

Actual behavior: The Rancher UI stalls when provisioning at networks tab and the provisioning process fails.

Expected behavior: Provisioning a new rke2 cluster when the network names are duplicated

Workaround: Provisioning the cluster with cluster templates. The networks can be specified

https://github.com/rancher/cluster-template-examples/blob/main/charts/values-vsphere.yaml

  # vSphere network where the virtual machine will be attached
  # network: ""

A different workaround is using terraform.

momesgin commented 6 months ago

@gaktive The main discussion around this issue can be found in SURE-6177, and the proposed fix(using ids instead of names) will require changes on both backend and UI side. SURE-6177 is still in "Waiting for Reporter" status, and once we decide to implement this, the UI part of it will be blocked by the BE.

gaktive commented 5 months ago

SURE-6177 closed due to inactivity so if UI needs this, then this will require additional input.

gaktive commented 4 months ago

SURE-6177 closed due to inactivity so if UI needs this, then this will require additional input.

gaktive commented 4 months ago

From @snasovich:

the implementation of proposed fix will require changes on both backend and UI side: "Therefore, an alternate strategy to this would be the UI referencing the MOID value rather than the port group name. I would still list the port groups in the UI by name, but once selected, the ID can be used instead"

That is because I'm pretty sure UI is currently using meta/vsphere/networks endpoint in Rancher to get networks and it returns plain list of strings - see https://github.com/rancher/rancher/blob/f0b3227927ae99dbc8c944b3aca908708bbf23ea/pkg/api/norman/customization/vsphere/listers.go#L307

So, this will not be a simple fix and will require a redesign of backend/UI data contract and behavior and will likely need to be considered pretty much a feature request.

Potential workaround: create a cluster using TF or cluster templates. Needs backend input though.

gaktive commented 4 months ago

Need to file a rancher/rancher ticket and then have that prioritized.

gaktive commented 3 months ago

Filed https://github.com/rancher/rancher/issues/44779 on the backend and added Hostbusters.

nwmac commented 1 month ago

@gaktive Moving this into 2.9.0 and triage for us to review and check milestone.