Skip to content

Add --fallback-requisite-zones command line argument #1532

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

Merged

Conversation

pwschuurman
Copy link
Contributor

@pwschuurman pwschuurman commented Dec 4, 2023

What type of PR is this?
/kind bug

What this PR does / why we need it:
Fixes Regional Persistent Disk provisioning on GKE Autopilot clusters when there is only 0 or 1 zones available across nodes in the cluster.

Which issue(s) this PR fixes:
Fixes #1531

Special notes for your reviewer:
This changes the behavior for Regional PD CreateVolume calls that have only one preferred topology. Previously, if a Regional PD was provisioned with a single preferredTopology (zone), and a list of requisite topologies (Zone), the secondary zone would be selected at random. This differed from the logic in the external provisioner, which picks the secondary zone deterministically, based on the primary preferred topology.

We don't expect this scenario to occur in practice, since the external provisioner will either pass in in at least two preferred topologies, or only one (and currently will fail, unless the --fallback-requisite-zones flag is provided). So it is safe to change this behavior as there should not be any real world scenarios relying on the random selection of the secondary zone that would be broken by a change to determinism.

Does this PR introduce a user-facing change?:

Add --fallback-requisite-zones flag to allow disk provisioning to fallback to a default set of zones when there are an insufficient number of zones available in a passed in requisite topology in CreateVolume.

@k8s-ci-robot k8s-ci-robot added kind/bug Categorizes issue or PR as related to a bug. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels Dec 4, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pwschuurman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 4, 2023
@pwschuurman pwschuurman force-pushed the extra-requisite-zones branch 2 times, most recently from 617666c to 55f8eec Compare December 5, 2023 04:45
@pwschuurman
Copy link
Contributor Author

/assign @msau42

@pwschuurman
Copy link
Contributor Author

/cc @amacaskill

@amacaskill
Copy link
Member

/cc @amacaskill

This LGTM. All the test cases you added helps make it clear this still works with volume cloning. The only testcase I didn't see was regional -> regional volume cloning with --fallback-requisite-zones specified / used.

@pwschuurman pwschuurman force-pushed the extra-requisite-zones branch from 55f8eec to e1633ab Compare December 12, 2023 21:37
@pwschuurman
Copy link
Contributor Author

/cc Alexis MacAskill

This LGTM. All the test cases you added helps make it clear this still works with volume cloning. The only testcase I didn't see was regional -> regional volume cloning with --fallback-requisite-zones specified / used.

Thanks, added an extra test case for regional -> regional volume cloning.

@msau42
Copy link
Contributor

msau42 commented Dec 14, 2023

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 14, 2023
@k8s-ci-robot k8s-ci-robot merged commit 584be14 into kubernetes-sigs:master Dec 14, 2023
@pwschuurman
Copy link
Contributor Author

/cherrypick release-1.12

@k8s-infra-cherrypick-robot

@pwschuurman: new pull request created: #1542

In response to this:

/cherrypick release-1.12

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/bug Categorizes issue or PR as related to a bug. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regional PD Creation fails when Autopilot cluster has only 1 zone available
5 participants