rancher / dashboard

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

AKS: Unable to create cluster with underscore in name #9416

Open cpinjani opened 1 year ago

cpinjani commented 1 year ago

Setup

Describe the bug AKS: Unable to create cluster with underscore in name. The same is valid as per AKS Docs

To Reproduce Create AKS cluster via Rancher UI with "_" in name eg. rancher_test

Expected Result User must be able to create AKS cluster with underscore in name as it is supported image

Screenshots image

cc: @rancher/highlander

cpinjani commented 7 months ago

Validated on build: v2.9-6d87a11ea46b7571646d7c3d7af704584c39fd62-head Seems not fixed since unable to create cluster with underscore in name.

image

yonasberhe23 commented 5 months ago

@mantis-toboggan-md I'm getting an error when the cluster name has an underscore. can you take a look please?

Image

mantis-toboggan-md commented 5 months ago

That error is coming from the backend, it looks like the norman api has different validation for cluster names than the azure portal. I'm not sure if thats intentional - could anyone from @rancher/highlander weigh in?

valaparthvi commented 4 months ago

I can reproduce this issue as well on Rancher (v2.9-d2fa8a7d6116c48a814ee7983af522d614461e49-head), Dashboard (master 526f329). cc: @mjura @yiannistri

gaktive commented 4 months ago

@kkaempf this may be backend related, can you have someone take a look?

gaktive commented 4 months ago

At this time, this may be a release blocker.

yiannistri commented 4 months ago

Sharing my findings regarding this issue:

Given that this issue is not specific to AKS (or any other hosted provider) and the fact that our UI prevents users from using underscores in other parts of the app, I'm not sure how we should proceed. It feels like changing this logic would affect cluster creation in general (so not exactly a quick fix before a major release) and it would make the app somewhat inconsistent in terms of cluster naming rules.

cc @kkaempf @gaktive @mjura for input

Screenshot from 2024-07-12 16-20-32

gaktive commented 4 months ago

@nwmac based on this library and where we also don't permit underscores, it sounds like we can't easily make this work with the time we have left. Since this has been around for a while, should we tackle this later or what should we try in the current timeframe?

nwmac commented 4 months ago

@gaktive I don't think we allow the underscore because Rancher uses that name to name the cluster resource - this is a k8s object and I don't believe _ is valid for that. So, AWS may allow it, but because of how Rancher works, we don't.

This would require backend changes that may not be straight forward.

Thus, we should not do this for 2.9.0 and should hand over to the backend team to own.

nwmac commented 4 months ago

@cpinjani Does this work with 2.8? (We migrated the UI from the old Ember to Vue in 2.9, so want to check if this is a side-effect of that).

cpinjani commented 4 months ago

@nwmac Its a legacy issue initially reported on v2.7 and reproducible across Rancher versions.

nwmac commented 4 months ago

@cpinjani Thank you

@gaktive I am going to remove the release-blocker label - since this is not a regression, this is a not a release blocker.

gaktive commented 4 months ago

I'll push this to 2.10.0 then. I'll put a release note label here though I think we may have this known issue about _ in names documented somewhere already. @btat can keep me honest.

gaktive commented 1 month ago

Need to push this out and resync with Highlander on what the backend should be doing for validation.