Cinder storage Class doesn't seem to be setting up volumes correctly

Bug #1836077 reported by Dominik Fleischmann
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju

Bug Description

I deployed a CDK on top of OpenStack with the following commands:

juju deploy kuberentes-core --overlay k8s-openstack-overlay.yaml

with the following k8s-openstack-overlay.yaml being:

    charm: cs:~containers/openstack-integrator
      subnet-id: "45fb4f09-f51c-475d-a13c-4549b6355e38"
    num_units: 1
  - ['openstack-integrator', 'kubernetes-master']
  - ['openstack-integrator', 'kubernetes-worker']

When I execute the following commands:

kubectl create -f - <<EOY
kind: PersistentVolumeClaim
apiVersion: v1
  name: testclaim2
    - ReadWriteOnce
      storage: 100Mi
  storageClassName: cinder

kubectl create -f - <<EOY
apiVersion: v1
kind: Pod
  name: busybox
  namespace: default
    - image: busybox
        - sleep
        - "3600"
      imagePullPolicy: IfNotPresent
      name: busybox
        - mountPath: "/pv"
          name: testvolume
  restartPolicy: Always
    - name: testvolume
        claimName: testclaim2

The busybox never gets to a ready state due to: 'pod has unbound immediate PersistentVolumeClaims'

This is using the cinder storage class that is created automatically when using the openstack-integrator charm.

If I create my own storage class like this

kubectl create -f - <<EOY
kind: StorageClass
  name: openstack-standard

And I create the busybox with this storage class it works.

These are the descriptions of the 2 storage classes:
ubuntu@jujucli:~$ kubectl describe storageclass cinder
Name: cinder
IsDefaultClass: No
Annotations: <none>
Provisioner: csi-cinderplugin
Parameters: <none>
AllowVolumeExpansion: <unset>
MountOptions: <none>
ReclaimPolicy: Delete
VolumeBindingMode: Immediate
Events: <none>
ubuntu@jujucli:~$ kubectl describe storageclass openstack-standard
Name: openstack-standard
IsDefaultClass: No
Annotations: <none>
Parameters: <none>
AllowVolumeExpansion: <unset>
MountOptions: <none>
ReclaimPolicy: Delete
VolumeBindingMode: Immediate
Events: <none>

Tags: osm
Cory Johns (johnsca)
no longer affects: charm-aws-integrator
Revision history for this message
Cory Johns (johnsca) wrote :

The changes to CDK to use the external cloud provider for openstack, the cinder CSI plugin, and to automatically create the storage classes got missed for the latest release, so "" is still the proper value for the SC provider for now.

The SC that was automatically created came from Juju. It seems that Juju will need to detect whether the CSI plugin is available. Additionally, there was a recent upstream change[1] to the CSI plugin which affects the provider value. So Juju will also need to check the version of the plugin to determine which provider value to use for the SC:

* no CSI plugin:
* CSI plugin less than v1.2.0: csi-cinderplugin
* CSI plugin v1.2.0 or greater:


no longer affects: charm-openstack-integrator
Adam Israel (aisrael)
tags: added: osm
Ian Booth (wallyworld)
Changed in juju:
importance: Undecided → High
assignee: nobody → Harry Pidcock (hpidcock)
status: New → Triaged
Harry Pidcock (hpidcock)
Changed in juju:
status: Triaged → In Progress
Harry Pidcock (hpidcock)
Changed in juju:
assignee: Harry Pidcock (hpidcock) → nobody
status: In Progress → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.