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

Machine set creation fails if AZ is not selection with OpenStack Provider #6761

Open
gmaksimov opened this issue Aug 5, 2024 · 2 comments
Open
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. sig/ui Denotes a PR or issue as being assigned to SIG UI.

Comments

@gmaksimov
Copy link

gmaksimov commented Aug 5, 2024

What happened

When creating a Machine set (during initial cluster provision or adding to existing cluster), the creation fails if Availability Zone is not selected.
Availability Zone field is not mandatory.

Expected behavior

Option1: Availability Zone field should be mandatory (preferably pre-selected as flavor)
Option2: Availability Zone should be selected by the backend randomly

How to reproduce

Create a Machine set (during initial cluster provision or adding to existing cluster) without specifying Availability Zone (non mandatory field).
The creation fails in the last stage with the following error:
failed to create machine deployment: admission webhook "machine-controller.kubermatic.io-machinedeployments" denied the request: validation failed: failed to get availability zone "": not found

Environment

  • UI Version: v2.25.5
  • API Version: v2.25.5
  • Domain:
  • Others: OpenStack provider with 3 AZs.

Current workaround

Select Availability Zone

Affected user persona

Business goal to be improved

Metric to be improved

@gmaksimov gmaksimov added kind/bug Categorizes issue or PR as related to a bug. sig/ui Denotes a PR or issue as being assigned to SIG UI. labels Aug 5, 2024
@gmaksimov
Copy link
Author

I would prefer to go with option 1, making the AZ field mandatory and pre-selected with the first AZ by default.
What are your thoughts?

Option1 (Availability Zone field should be mandatory (preferably pre-selected as flavor)

The field can be changed to mandatory here:
https://github.com/kubermatic/dashboard/blob/main/modules/web/src/app/node-data/basic/provider/openstack/component.ts#L167

Error is returned from getAvailabilityZone function of machine-controller:
https://github.com/kubermatic/machine-controller/blob/main/pkg/cloudprovider/provider/openstack/provider.go#L537

Which specifically requires AZ to be selected.
https://github.com/kubermatic/machine-controller/blob/main/pkg/cloudprovider/provider/openstack/helper.go#L109

Option2 (Availability Zone should be selected by the backend randomly)

However, for option2 there is AddDefaults function in machine-controller. It seems to select AZ automatically if there is only 1 AZ. The "random" AZ can be added here.
https://github.com/kubermatic/machine-controller/blob/main/pkg/cloudprovider/provider/openstack/provider.go#L385

@kubermatic-bot
Copy link
Contributor

Issues go stale after 90d of inactivity.
After a furter 30 days, they will turn rotten.
Mark the issue as fresh with /remove-lifecycle stale.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@kubermatic-bot kubermatic-bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. sig/ui Denotes a PR or issue as being assigned to SIG UI.
Projects
None yet
Development

No branches or pull requests

2 participants