Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing machineSelectorConfig throws unhandled exception #11987

Open
rak-phillip opened this issue Sep 20, 2024 · 4 comments · Fixed by #12061
Open

Missing machineSelectorConfig throws unhandled exception #11987

rak-phillip opened this issue Sep 20, 2024 · 4 comments · Fixed by #12061
Assignees
Labels
kind/bug QA/dev-automation Issues that engineers have written automation around so QA doesn't have look at this status/backport-candidate
Milestone

Comments

@rak-phillip
Copy link
Member

rak-phillip commented Sep 20, 2024

A missing machineSelectorConfig for an RKE2 cluster can cause the edit form to fail to render.

Steps to reproduce

  • Navigate to Cluster Management and click on Create
  • Select Custom
  • Add a name to the cluster and click on "Edit as YAML"
  • Update machineSelectorConfig to machineSelectorConfig: []
  • Click Create
  • Select the Overflow Menu for your newly created cluster and select "Edit Config"

Expected behavior

The edit form will render. If a missing machineSelectorConfig is an unexpected state, provide a warning to the user with information on how to resolve.

Actual behavior

The loading indicator is shown indefinitely, while an error is thrown in the browser console

image

Additional details

  • Reported in Rancher 2.9.1
  • The original report was for a recent install of Rancher v2.9.1; the cluster was created with terraform
  • Rancher was installed with the agent TLS mode set to Strict
  • The reproduction detailed above produces the same error as what was repported
  • This behavior looks to have introduced in Handle missing machineSelectors configurations #10186
@github-actions github-actions bot added the QA/dev-automation Issues that engineers have written automation around so QA doesn't have look at this label Sep 20, 2024
@rak-phillip rak-phillip added this to the v2.10.0 milestone Sep 20, 2024
@rak-phillip
Copy link
Member Author

@torchiaf can you provide more details on this error? I'm unsure if an empty machineSelectorConfig is a valid state, but it appears that there are ways to create RKE2 clusters that would put a cluster into this state.

@rak-phillip rak-phillip self-assigned this Sep 27, 2024
@rak-phillip
Copy link
Member Author

/backport v2.9.3

@yonasberhe23
Copy link
Contributor

@rak-phillip the edit form now loads properly when machineSelectorConfig is missing however, a few errors are thrown in the console. Are they expected? They don't seem to have any adverse effects but wanted to ask

TypeError: this.spec.rkeConfig.machineSelectorConfig is undefined
TypeError: this.cloudProviderOptions is undefined

Image

@yonasberhe23 yonasberhe23 self-assigned this Oct 10, 2024
@rak-phillip
Copy link
Member Author

@yonasberhe23 We shouldn't ever expect errors in the console.. but this configuration is really an edge case and the errors you report look the same as the ones from when the issues was reported.

I think it would make sense to resolve the errors as well. We can either reopen this issue or create a new one if we feel that this issue is resolved. We might also need to consider how much time we have available to fix and backport this change to v2.9.3

@gaktive do you have any input?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug QA/dev-automation Issues that engineers have written automation around so QA doesn't have look at this status/backport-candidate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants