How to enable gluster-block provisioning after OCS installation in Converged Mode.

Solution Verified - Updated -

Environment

  • OCS 3.x

Issue

  • How to enable gluster-block provisioning after OCS installation in Converged Mode if it’s missed during installation.

Resolution

  • Follow the steps to create to enable gluster-block provisioner:

    1. Extract the key value of the heketi admin key:

      # oc get secret heketi-storage-admin-secret -o yaml | grep key
      
    2. Create heketi-admin block secret:

      apiVersion: v1
      data:
      key:  <value of heketi admin key>
      kind: Secret
      metadata:
      name: heketi-storage-admin-secret-block
      namespace: <namepsace>
      type: gluster.org/glusterblock
      
    3. Create glusterblock-provisioner resources from template:

      # oc create -f /usr/share/heketi/templates/glusterblock-provisioner.yaml
      
    4. Edit parameters - IMAGE_NAME and IMAGE_VERSION in gluster-block provisioner template.

      # oc edit template glusterblock-provisioner
      
    5. Create the deployment configuration

      # oc process -p PROVISIONER_NAME=gluster.org/glusterblock-app-storage glusterblock-provisioner -o yaml | oc create -f -
      
    6. Create glusterfs-block storage class and pass the secert "heketi-storage-admin-secret-block" created in above step:

      apiVersion: storage.k8s.io/v1
      kind: StorageClass
      metadata:
      annotations:
       storageclass.kubernetes.io/is-default-class: "false"
      name: glusterfs-storage-block
      parameters:
      chapauthenabled: "true"
      hacount: "3"
      restsecretname: heketi-storage-admin-secret-block
      restsecretnamespace: <namespace>
      resturl: http://heketi-storage.<namespace>.svc:8080
      restuser: admin
      provisioner: gluster.org/glusterblock-storage
      reclaimPolicy: Delete
      volumeBindingMode: Immediate
      
  • Verify gluster-block provisioning is enabled by following below steps:

    1. gluster-block provisioner pod is running

      # oc get pods -n <gluster-namespace> 
      
    2. Create a PVC using glusterfs-storage-block storage class.

Root Cause

  • During OCS installation, gluster-block provisioning is disabled. If the variable openshift_storage_glusterfs_block_deploy is set as False in inventory gluster-block provisioning is disabled.

Diagnostic Steps

  • Check gluster-block provisioner pod is running or not:

    # oc get pods -n <gluster-namespace> |grep gluster-block
    

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments