Bug 1710569

Summary: Set non-default storage prefix for Service Catalog resources in etcd
Product: OpenShift Container Platform Reporter: Jay Boyd <jaboyd>
Component: Service CatalogAssignee: Jesus M. Rodriguez <jesusr>
Status: CLOSED ERRATA QA Contact: Bruno Andrade <bandrade>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.1.0CC: bandrade, chezhang, chuo, jfan, jforrest, scolange, sponnaga, zitang
Target Milestone: ---Keywords: BetaBlocker
Target Release: 4.1.0   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-04 10:48:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jay Boyd 2019-05-15 19:31:49 UTC
similar to Bug 1710293 - Wrong storage prefix for kubernetes resources in etcd 

Service Catalog should specify the storage prefix for all service catalog resources and not use the default of /registry/  

It should be set to /servicecatalog.k8s.io/ per Derek.  This should be delivered to 4.1 and master.

Comment 1 Jesus M. Rodriguez 2019-05-15 19:39:33 UTC
PR posted https://github.com/openshift/cluster-svcat-apiserver-operator/pull/54

Comment 2 Jian Zhang 2019-05-16 06:54:56 UTC
Hi, Jay

Do you mean we should remove `/registry` and use the `/servicecatalog.k8s.io` as the prefix directly, right?
Current storage path of Service Catalog resources in etcd:
Cluster version is 4.1.0-0.nightly-2019-05-15-151517
sh-4.2# ETCDCTL_API=3 etcdctl --endpoints --cacert=/etc/ssl/etcd/ca.crt --cert=/etc/ssl/etcd/system:etcd-peer:etcd-0.baremetal-lab-01.qe.devcluster.openshift.com.crt --key=/etc/ssl/etcd/system:etcd-peer:etcd-0.baremetal-lab-01.qe.devcluster.openshift.com.key get / --prefix --keys-only |grep registry|grep servicecatalog

Comment 3 Jay Boyd 2019-05-16 12:03:53 UTC
Hi Jian

the /registry/ is the default storage prefix.  This issue was created to change that.  Derek & master team provided direction and final determination was made to replace /registry/ with /servicecatalog/.   The new storage path will look like this:  



This issue is fixed by https://github.com/openshift/cluster-svcat-apiserver-operator/pull/55 in 4.1.

The issue is also fixed in master by https://github.com/openshift/cluster-svcat-apiserver-operator/pull/54.

Comment 5 Bruno Andrade 2019-05-16 16:33:26 UTC
Verified on 4.1.0-0.nightly-2019-05-16-142927

Steps of verification
1) Deployed Service Catalog
2) Created a simple Cluster Service Broker called "example-cluster-service-broker"
3) Checked storage path of Service Catalog: 

oc rsh -n openshift-etcd etcd-member-ip-10-0-138-182.sa-east-1.compute.internal

sh-4.2# export ETCDCTL_API=3 ETCDCTL_CACERT=/etc/ssl/etcd/ca.crt ETCDCTL_CERT=`ls /etc/ssl/etcd/*etcd-peer*crt` ETCDCTL_KEY=`ls /etc/ssl/etcd/*etcd-peer*key`
sh-4.2# etcdctl get / --endpoints --prefix --keys-only | grep "^/servicecatalog/" 

It has /servicecatalog/servicecatalog.k8s.io/ prefix as expected.

Comment 6 Jian Zhang 2019-05-17 05:32:00 UTC
Hi, Jay

Got it, thank you for the clarification! 


Excellent! You know, currently, the Service Catalog operators don't provide the `version` info, so we use commit PR to trace it.
so it would be great if you could provide the source commit id of svcat-apiserver. Like below, the current source commit is `fc35db5b2fe00bc912ae1468fda32ba5d46852fe` in branch 4.1 which above fixed PR merged in.
mac:0517 jianzhang$ oc get pods -n openshift-service-catalog-apiserver-operator -o yaml|grep image
      image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:a3f943eac706035025b87f11564771a525c97b8d693f47414d39d689a032bb15
      imagePullPolicy: IfNotPresent
      image: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:a3f943eac706035025b87f11564771a525c97b8d693f47414d39d689a032bb15
      imageID: quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:a3f943eac706035025b87f11564771a525c97b8d693f47414d39d689a032bb15
mac:0517 jianzhang$ oc image info quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:a3f943eac706035025b87f11564771a525c97b8d693f47414d39d689a032bb15|grep commit

Comment 9 errata-xmlrpc 2019-06-04 10:48:48 UTC
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.