Description of problem: When a cluster is created manually without any nodes or bricks and when such a cluster id is defined as part of storage class, pvc creation fails with 'Error calling v.allocBricksInCluster: Id not found'. Looks like we just return the error received from the function. A better error message should be provided. p.s., This bug is more of an enhancement, uncovered during negative test. Regular workflow of CNS will not end up in this scenario. [root@dhcp46-201 ~]# heketi-cli cluster info 75f2bdc4e362b8f78833af932f0ebcf9 Cluster id: 75f2bdc4e362b8f78833af932f0ebcf9 Nodes: [root@dhcp46-201 ~]# cat storageclass_voltype apiVersion: storage.k8s.io/v1beta1 kind: StorageClass metadata: name: voltypenegative provisioner: kubernetes.io/glusterfs parameters: resturl: "http://heketi-storage-project.cloudapps.mystorage.com" restuser: "test" clusterid: "75f2bdc4e362b8f78833af932f0ebcf9" [root@dhcp46-201 ~]# oc describe pvc/clusterid Name: clusterid Namespace: storage-project StorageClass: voltypenegative Status: Pending Volume: Labels: <none> Capacity: Access Modes: Events: FirstSeen LastSeen Count From SubObjectPath Type Reason Message --------- -------- ----- ---- ------------- -------- ------ ------- 21s 11s 2 {persistentvolume-controller } Warning ProvisioningFailed Failed to provision volume with StorageClass "voltypenegative": glusterfs: create volume err: error creating volume Error calling v.allocBricksInCluster: Id not found. Version-Release number of selected component (if applicable): # rpm -qa | grep 'heketi' heketi-client-4.0.0-1.el7rhgs.x86_64 # oc version oc v3.5.0.37 kubernetes v1.5.2+43a9be4 features: Basic-Auth GSSAPI Kerberos SPNEGO openshift v3.5.0.37 kubernetes v1.5.2+43a9be4 How reproducible: always Steps to Reproduce: provided along with the description
This is the error returned from Heketi. In the same scenario if we try 'heketi-cli' you will land into same error. This has to be fixed at heketi layer. I will change the componenet back to Heketi and open an issue at heketi upstream.
@Karthick, can you please open an upstream heketi issue for a better error message, please let me know if you need any help.
(In reply to Humble Chirammal from comment #3) > @Karthick, can you please open an upstream heketi issue for a better error > message, please let me know if you need any help. Upstream heketi bug raised - https://github.com/heketi/heketi/issues/712
https://github.com/heketi/heketi/pull/1199
Updated doc text in the Doc Text field. Please review for technical accuracy.
Doc Text LGTM
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2018:2686