Cluster-api-provider-azure: Fail fast when quota is not sufficient

Created on 10 Apr 2020  路  18Comments  路  Source: kubernetes-sigs/cluster-api-provider-azure

/kind bug

What steps did you take and what happened:
[A clear and concise description of what the bug is.]
When creating a cluster in a region where subscription doesn't have enough quota, it doesn't fast fail but keeps reconciling

What did you expect to happen:
It should fast fail after checking whether it has enough quota in the sub

Anything else you would like to add:
[Miscellaneous information that will assist in solving the issue.]

Environment:

  • cluster-api-provider-azure version:
  • Kubernetes version: (use kubectl version):
  • OS (e.g. from /etc/os-release):
good first issue help wanted kinbug lifecyclrotten

Most helpful comment

/assign

All 18 comments

/good-first-issue

@CecileRobertMichon:
This request has been marked as suitable for new contributors.

Please ensure the request meets the requirements listed here.

If this request no longer meets these requirements, the label can be removed
by commenting with the /remove-good-first-issue command.

In response to this:

/good-first-issue

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

/assign

/unassign

/assign

/unassign

Discussed with @ritazh and others.

@shanalily @ritazh, do you have any findings to share about this issue that could be useful for someone else when they pick up the issue that you want to share?

The team discussed what the user experience should be for this issue.
Some options are:

  1. If creation failed due to quota issue, then create a K8s event resource to bubble up the error. Continue to reconcile in case quota issue eventually resolves. [This seems to be the behavior for other cluster api providers as well. This is the one we landed on.]
  2. If creation failed due to quota issue, then create a K8s event resource to bubble up the error and skips reconciliation.
  3. If creation failed due to quota issue, then create a K8s event resource to bubble up the error. Continue to reconcile after some duration in case quota issue eventually resolves. [Not clear what this duration should be and where to derive it from.]

/assign

To add a bit to @ritazh's comment above, just for posterity. We also discussed using Compute Usage API to see if there are enough of a VM SKU available.

Might be useful for changes to MachineDeployment / MachinePool validation.

Option 1) seems like the best way to handle this to me as well.

We might also want to bubble up the error (and other errors) to AzureMachine status as well, right now AzureCluster and AzureMachine status don't show much. For future improvement, it would be nice to add a Phase similar to Cluster/Machine status.

@ritazh are you working on this? I see you're still assigned.

@CecileRobertMichon sorry for the delay. Have not had time to work on this yet.

/unassign

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

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

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

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

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ams0 picture ams0  路  8Comments

nader-ziada picture nader-ziada  路  8Comments

shysank picture shysank  路  8Comments

zawachte-msft picture zawachte-msft  路  3Comments

CecileRobertMichon picture CecileRobertMichon  路  7Comments