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

Creating PVs fails when Openstack has multiple compute AZs, but only one storage AZ #74

Open
Linutux opened this issue Sep 23, 2020 · 6 comments
Labels
pinned Never stale

Comments

@Linutux
Copy link
Contributor

Linutux commented Sep 23, 2020

Creating PVs fails, wehen installing in an openstack environment, where you have multiple AZs for compute (e.g. ams-a, ams-b, ams-c) but only one for storage (e.g. nova). Kubernetes tries to create them in the compute AZs, which openstack doesn't allow.

There is a solution in openshift/installer#2844 (comment)

Especially you need the "ignore_volume_az" option in cloud provider config.

@Linutux Linutux changed the title Allow AZ for storage class to be set to nova Creating PVs fails when Openstack has multiple compute AZs, but only one storage AZ Sep 23, 2020
@Linutux
Copy link
Contributor Author

Linutux commented Sep 23, 2020

@remche
Copy link
Owner

remche commented Sep 23, 2020

Option added in v0.5.4 release, can you confirm it's working as desired ?

@Linutux
Copy link
Contributor Author

Linutux commented Sep 26, 2020

Option added in v0.5.4 release, can you confirm it's working as desired ?

No, its not working:

Failed to provision volume with StorageClass "cinder": failed to create a 19 GB volume: Bad request with: [POST https://volume.api.ams.fuga.cloud:443/v3/922d27f06e9a42549509b420ff427fc0/volumes], error message: {"badRequest": {"message": "Availability zone 'ams-b' is invalid.", "code": 400}}

@Linutux
Copy link
Contributor Author

Linutux commented Sep 27, 2020

Ok, I think I found out why it is not working:

According to https://kubernetes.io/docs/concepts/storage/storage-classes/#openstack-cinder you need to specify

parameters:
availability: nova

when creating the storage class for cinder, otherwise ...

availability: Availability Zone. If not specified, volumes are generally round-robin-ed across all active zones where Kubernetes cluster has a node.

So, in my case the node (Openstack compute) AZs are ams-a, ams-b, ams-c. But the storage AZ is ams. But instead of using ams, the storage class tries to create one in ams-a, -b or -c, unless the parameter "availabilty" is set.

unfortunately I don't see any option to control provider_rke to create this option when setting up the cluster.

Edit:
Yes, after creating a new cinder storage class manually, everything is working now.

apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: cinder
provisioner: kubernetes.io/cinder
parameters:
availability: ams

@remche
Copy link
Owner

remche commented Sep 28, 2020

@Linutux the storage classes are created here.
It should not be too difficult to add a variable for avaibility zone. I wonder if it should be set by storage_types or globally.

@Linutux
Copy link
Contributor Author

Linutux commented Oct 9, 2020

I think it should be set by storage_types. Maybe you have SSDs in DC1 and DC2, but only HDDs in DC3 and DC4

@remche remche added the pinned Never stale label Dec 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pinned Never stale
Projects
None yet
Development

No branches or pull requests

2 participants