Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1388316 - Failed to provision GlusterFS PV/volume with StorageClass using secret + namespace
Failed to provision GlusterFS PV/volume with StorageClass using secret + name...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage (Show other bugs)
3.4.0
Unspecified Unspecified
urgent Severity urgent
: ---
: ---
Assigned To: Humble Chirammal
Jianwei Hou
:
: 1388368 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-10-25 02:05 EDT by Jianwei Hou
Modified: 2017-03-08 13 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-01-18 07:44:38 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0066 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.4 RPM Release Advisory 2017-01-18 12:23:26 EST

  None (edit)
Description Jianwei Hou 2016-10-25 02:05:15 EDT
Description of problem:
Create a StorageClass and configure its parameters to use secret + namespace, the PV creation fails with error: Failed to provision volume with StorageClass
"glusterprovisioner1": failed to get secret from ["jhou"/"heketi-secret"]

But the secret is present in the target namespace:

Version-Release number of selected component (if applicable):
openshift v3.4.0.15+9c963ec
kubernetes v1.4.0+776c994
etcd 3.1.0-alpha.1

How reproducible:
Always

Steps to Reproduce:
1. Create a secret in a target namespace
2. Update the StorageClass's parameters field, use secretName and secretNamespace(not restuserkey)
3. Create the StorageClass
4. Create a PVC that uses this StorageClass as provisioner

Actual results:
No PV provisioned.

# oc describe pvc glusterc            
Name:		glusterc
Namespace:	jhou
StorageClass:	glusterprovisioner1
Status:		Pending
Volume:		
Labels:		<none>
Capacity:	
Access Modes:	
Events:
  FirstSeen	LastSeen	Count	From				SubobjectPath	Type		Reason			Message
  ---------	--------	-----	----				-------------	--------	------			-------
  6m		14s		27	{persistentvolume-controller }			Warning		ProvisioningFailed	Failed to provision volume with StorageClass
"glusterprovisioner1": failed to get secret from ["jhou"/"heketi-secret"]

# oc get secrets heketi-secret -n jhou
NAME            TYPE      DATA      AGE
heketi-secret   Opaque    1         4m

# oc get storageclass -o yaml
apiVersion: v1
items:
- apiVersion: storage.k8s.io/v1beta1
  kind: StorageClass
  metadata:
    creationTimestamp: 2016-10-25T05:51:05Z
    name: glusterprovisioner1
    resourceVersion: "8078"
    selfLink: /apis/storage.k8s.io/v1beta1/storageclasses/glusterprovisioner1
    uid: 04dbdd54-9a77-11e6-9420-0e4f3633a564
  parameters:
    resturl: http://<hidden>
    restuser: admin
    secretName: heketi-secret
    secretNamespace: jhou
  provisioner: kubernetes.io/glusterfs
kind: List
metadata: {}


Expected results:
Could provision PV/volume successfully

Additional info:
This feature was tested upstream, test version:
Client Version: version.Info{Major:"1", Minor:"5+", GitVersion:"v1.5.0-alpha.1.444+1d323adade5fc6", GitCommit:"1d323adade5fc6ecd898908d2c6cb391c8748835", GitTreeState:"clean", BuildDate:"2016-10-18T02:54:24Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"5+", GitVersion:"v1.5.0-alpha.1.444+1d323adade5fc6", GitCommit:"1d323adade5fc6ecd898908d2c6cb391c8748835", GitTreeState:"clean", BuildDate:"2016-10-18T02:54:24Z", GoVersion:"go1.6.2", Compiler:"gc", Platform:"linux/amd64"}
Comment 1 hchen 2016-10-25 10:12:34 EDT
The process changed. The new
Comment 2 Humble Chirammal 2016-10-26 06:40:57 EDT
Looks like both Ceph ( https://bugzilla.redhat.com/show_bug.cgi?id=1388368 ) and GlusterFS fails with an error to fetch secrets in Openshift. iic, this was tested in kubernetes upstream and passed. I am not sure whether some special setup is required for openshift. I am adding Jan and Huamin for their thoughts.
Comment 3 Jan Safranek 2016-10-26 07:24:14 EDT
Gluster provisioner seems not to have access to secrets.

* I filled https://github.com/kubernetes/kubernetes/pull/35615 to get nicer message in oc describe pvc:
Failed to provision volume with StorageClass "glusterprovisioner1": failed to get secret default/heketi-secret: User "system:serviceaccount:openshift-infra:pv-binder-controller" cannot get secrets in project "default"]

(this not really *required* in Origin in 3.4)

* I filled https://github.com/openshift/origin/pull/11581 with system:serviceaccount:openshift-infra:pv-binder-controller permission updates
Comment 4 Jan Safranek 2016-10-26 07:25:03 EDT
*** Bug 1388368 has been marked as a duplicate of this bug. ***
Comment 5 Humble Chirammal 2016-10-26 09:00:59 EDT
(In reply to Jan Safranek from comment #3)
> Gluster provisioner seems not to have access to secrets.
> 
> * I filled https://github.com/kubernetes/kubernetes/pull/35615 to get nicer
> message in oc describe pvc:
> Failed to provision volume with StorageClass "glusterprovisioner1": failed
> to get secret default/heketi-secret: User
> "system:serviceaccount:openshift-infra:pv-binder-controller" cannot get
> secrets in project "default"]
> 
> (this not really *required* in Origin in 3.4)
> 
> * I filled https://github.com/openshift/origin/pull/11581 with
> system:serviceaccount:openshift-infra:pv-binder-controller permission updates

Thanks Jan!!
Comment 7 Troy Dawson 2016-11-07 14:33:24 EST
This has been merged into ose and is in OSE v3.4.0.23 or newer.
Comment 9 Jianwei Hou 2016-11-08 00:57:38 EST
This is still reproduced on:
openshift v3.4.0.23+24b1a58
kubernetes v1.4.0+776c994
etcd 3.1.0-rc.0

# oc describe pvc glusterc
Name:		glusterc
Namespace:	jhou
StorageClass:	glusterprovisioner1
Status:		Pending
Volume:		
Labels:		<none>
Capacity:	
Access Modes:	
Events:
  FirstSeen	LastSeen	Count	From				SubobjectPath	Type		Reason			Message
  ---------	--------	-----	----				-------------	--------	------			-------
  30s		10s		3	{persistentvolume-controller }			Warning		ProvisioningFailed	Failed to provision volume with StorageClass "glusterprovisioner1": failed to get secret from ["jhou"/"heketi-secret"]

# oc get secret/heketi-secret -n jhou
NAME            TYPE      DATA      AGE
heketi-secret   Opaque    1         14m
Comment 13 Jordan Liggitt 2016-11-09 10:35:52 EST
The secret type must match the provisioner, not be Opaque
Comment 14 Jan Safranek 2016-11-09 11:28:51 EST
As Jordan wrote, the secret type must be either "kubernetes.io/glusterfs" or "kubernetes.io/rbd" respectively. Relevant docs change is here: https://github.com/kubernetes/kubernetes.github.io/pull/1594/files

Sorry, I should have let you know earlier.
Comment 15 Jianwei Hou 2016-11-10 00:45:02 EST
@jliggitt @jsafrane Thank you! With secret type being  "kubernetes.io/glusterfs", the issue is gone! This bug can be verified now. Could you please change its status to ON_QA?
Comment 16 Bradley Childs 2016-11-10 13:44:56 EST
moving to on_qa per comment.
Comment 17 Jianwei Hou 2016-11-10 19:58:24 EST
This is fixed according to comment 15.
Comment 19 errata-xmlrpc 2017-01-18 07:44:38 EST
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/RHBA-2017:0066

Note You need to log in before you can comment on or make changes to this bug.