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

Add option to handle absent cross_az_attach #464

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

noonedeadpunk
Copy link
Contributor

@noonedeadpunk noonedeadpunk commented Nov 29, 2024

At the moment volumes for workers are gonna be spawn in a default
AZ completely disregarding user request for Availability Zone.

In a design where cross_az_attach is disabled, an attempt
to add a volume to worker has high failure percentage due to fallback
to the default scheduling zone, unless allow_availability_zone_fallback
is disabled.

This patch adds a configuration option cross_az_attach which is set
to True by default to align with Nova typical behavior. It will define
AZ to be set to nova according to a CSI default [1].

When cross_az_attach is set to False, AZ for the volume will be set to
the cluster AZ value.
This ensures that volume will be created in a same zone as workers are
preventing failures.

[1] https://github.com/kubernetes/cloud-provider-openstack/blob/d228854cf58e7b4ed93d5e7ba68ab639450e3449/docs/cinder-csi-plugin/using-cinder-csi-plugin.md#supported-parameters

Relates-to: #366

@noonedeadpunk
Copy link
Contributor Author

Ok, now I see how it's wrong... As eventually you might have only 1 AZ in cinder while have multiple in Nova, which will break the behavior who has cross-az attach :(

@noonedeadpunk noonedeadpunk marked this pull request as draft November 29, 2024 12:24
@noonedeadpunk noonedeadpunk changed the title Spawn cinder volumes in the same Availability Zone Add option to handle absent cross_az_attach Nov 29, 2024
@noonedeadpunk noonedeadpunk marked this pull request as ready for review November 29, 2024 13:26
@noonedeadpunk
Copy link
Contributor Author

I'd say there should be a follow-up patch to add smth like docker_volume_availability_zone label to allow users to override default AZ for cinder.

@noonedeadpunk noonedeadpunk marked this pull request as draft November 29, 2024 13:59
@noonedeadpunk noonedeadpunk marked this pull request as ready for review November 29, 2024 15:10
At the moment volumes for workers are gonna be spawn in a default
AZ completely disregarding user request for Availability Zone.

In a design where cross_az_attach is disabled, an attempt
to add a volume to worker has high failure percentage due to fallback
to the default scheduling zone, unless allow_availability_zone_fallback
is disabled.

This patch adds a configuration option `cross_az_attach` which is set
to True by default to align with Nova typical behavior. It will define
AZ to be set to `nova` according to a CSI default [1].

When `cross_az_attach` is set to False, AZ for the volume will be set to
the cluster AZ value.
This ensures that volume will be created in a same zone as workers are
preventing failures.

[1] https://github.com/kubernetes/cloud-provider-openstack/blob/d228854cf58e7b4ed93d5e7ba68ab639450e3449/docs/cinder-csi-plugin/using-cinder-csi-plugin.md#supported-parameters

Relates-to: vexxhost#366
@noonedeadpunk
Copy link
Contributor Author

recheck

1 similar comment
@noonedeadpunk
Copy link
Contributor Author

recheck

@noonedeadpunk
Copy link
Contributor Author

@mnaser @okozachenko1203 it would be really nice to get some input on this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant