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

Persistent Volumes created by a Storage Class on OpenStack ignore Availability Zones #70191

Open
alexzose opened this issue Jan 12, 2024 · 0 comments
Labels
okd-only Content that is only relevant to upstream OKD docs.

Comments

@alexzose
Copy link

We've setup a new OKD 4.13 cluster on OpenStack and noticed that when creating Persistent Volumes via a Storage Class that allows volume creation in multiple availability zones , then the Persistent Volumes ignore the availability zone and have their nodeAffinity section populated with all the availability zones of the OpenStack instead of the one where they were created.

This has as a consequence, when creating Stateful Sets, the pods being scheduled on different availability zones than their volumes and the pod never manages to mount the volume.

It should be mentioned here that the cross-attach on the OpenStack is not enabled.

After searching the documentation of the CSI cinder driver for OpenStack, it states that the (Optional) option ignore-volume-az is disabled by default, which is not the case for the OKD as we have discovered.

In the ConfigMap "cloud-conf" in the "openshift-cluster-csi-drivers" there is the option "ignore-volume-az = yes" and this causes these issues.

After setting the mentioned option to "ignore-volume-az = no" in the ConfigMap "cloud-provider-config" in the "openshift-config" namespace, this setting is propagated to the ConfigMap "cloud-conf" mentioned above, and the issue with the volumes is resolved.

Then, the volume's nodeAffinity is set correctly to the availability zone it was created and the pods are scheduled in the correct availability zone.

The point is that this behavior is not mentioned in the OKD documentation. We think there should be a note or a warning that this options is set to true on OKD and that if cross-attach is not enabled on OpenStack then this pod / volume availability zone mismatch will occur.

Link to the cinder CSI plugin config: https://github.com/kubernetes/cloud-provider-openstack/blob/master/docs/cinder-csi-plugin/using-cinder-csi-plugin.md#block-storage

@maxwelldb maxwelldb added the okd-only Content that is only relevant to upstream OKD docs. label Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
okd-only Content that is only relevant to upstream OKD docs.
Projects
None yet
Development

No branches or pull requests

2 participants