Ask Your Question

Cinder Storageclass not working in Kubernetes, how to debug?

asked 2018-11-22 02:44:46 -0500

reppinjo gravatar image

updated 2018-11-22 07:42:51 -0500

I have set up a Kubernetes Cluster with RKE and cloud provider = openstack, with my OS_AUTH credentials. When I create a storageclass for Cinder creating PersistentVolumes with it doesn't work, giving me an error message of wrong parameters, although I don't even give any in the StorageClass definition file. Any help of how to find the errror would be appreciated, all the examples on the web only give code I used and it seems to work for others.

I set up the storageclass like this:

kind: StorageClass 
  name: standard 

and create the PersistentVolumeClaim like this:

 kind: PersistentVolumeClaim
 apiVersion: v1 
   name: claim
   namespace: default
   - ReadWriteOnce   
       storage: 10Gi   
   storageClassName: standard

and then I get the error message from kubectl describe pvc claim: Failed to provision volume with StorageClass "standard": failed to create a 10 GB volume: Invalid request due to incorrect syntax or missing required parameters.

edit retag flag offensive close merge delete


I know very little about K8s, but the exact error message and the parameters passed to Cinder would help troubleshooting this.

Bernd Bausch gravatar imageBernd Bausch ( 2018-11-22 06:08:43 -0500 )edit

I can't say how to set up Kubernetes, but perhaps you have error messages in the Cinder logs that you could share.

However are you sure that the storage class and persistent volume claim are syntactically correct?

Bernd Bausch gravatar imageBernd Bausch ( 2018-11-22 07:43:49 -0500 )edit

There is no entry in the cinder logs, so it must be an issue of Kubernetes not reaching the service?

reppinjo gravatar imagereppinjo ( 2018-11-26 03:27:23 -0500 )edit

3 answers

Sort by ยป oldest newest most voted

answered 2019-03-22 03:31:39 -0500

reppinjo gravatar image

I think I found the solution. It's a bug in Rocky ( that was fixed in Cinder 13.0.1, so we'll have to do a minor version upgrade.

edit flag offensive delete link more

answered 2019-01-22 07:19:09 -0500

Christian Zunker gravatar image

updated 2019-01-22 07:19:59 -0500

We were aible to create a PVC with the provisioner. But we added parameters to it:

  type: volumes_hdd
  availability: cinderAZ_ceph

type is the cinder volume type. availability is the cinder AZ.

You posted:

or missing required parameters

Perhaps you are missing parameters like ours.

edit flag offensive delete link more

answered 2018-11-23 10:43:19 -0500

rduncan-t gravatar image

After creating the Cinder storage class you then need to pass in the ID of a cinder volume to create a persistient volume

cinder create --display_name pv0001 50G - take note of the ID and then ...

apiVersion: "v1"
kind: "PersistentVolume"
  name: "pv0001"
    storage: "50Gi"
    - "ReadWriteOnce"
    fsType: "ext3"
    volumeID: "<<volume id>>"

Then, you can make volume claims using the same id:

cat > nginx-cinder.yaml << END
apiVersion: v1
kind: Pod
  name: aws-web
    - name: web
      image: nginx
        - name: web
          containerPort: 80
          hostPort: 8081
          protocol: TCP
        - name: html-volume
          mountPath: "/usr/share/nginx/html"
    - name: html-volume
        # Enter the volume ID below
        volumeID: <<volume id>>
        fsType: ext4
edit flag offensive delete link more


I thought the idea of having a storage class was to automate this process, of course I can create everything manually but I don't want to have to go through the process whenever a new user logs on to the service (I'm setting up a Jupyterhub ). Am I wrong or what's the purpose of the storage class wh

reppinjo gravatar imagereppinjo ( 2018-11-26 03:26:42 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2018-11-22 02:44:46 -0500

Seen: 268 times

Last updated: Jan 22