Bug 1710569 - Set non-default storage prefix for Service Catalog resources in etcd
Summary: Set non-default storage prefix for Service Catalog resources in etcd
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Catalog
Version: 4.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: 4.1.0
Assignee: Jesus M. Rodriguez
QA Contact: Bruno Andrade
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-15 19:31 UTC by Jay Boyd
Modified: 2019-06-04 10:49 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-06-04 10:48:48 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:0758 None None None 2019-06-04 10:49:49 UTC

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 127.0.0.1:2379 --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
/registry/servicecatalog.k8s.io/clusterservicebrokers/ansible-service-broker
/registry/servicecatalog.k8s.io/clusterservicebrokers/template-service-broker
/registry/servicecatalog.k8s.io/clusterservicebrokers/ups-broker
/registry/servicecatalog.k8s.io/clusterserviceclasses/2597e83b-75f0-11e9-9b70-0a580a810008
...

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:  

/servicecatalog/servicecatalog.k8s.io/clusterserviceclasses/2597e83b-75f0-11e9-9b70-0a580a810008
/servicecatalog/servicecatalog.k8s.io/clusterservicebrokers/ups-broker

etc

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 127.0.0.1:2379 --prefix --keys-only | grep "^/servicecatalog/" 
/servicecatalog/servicecatalog.k8s.io/clusterservicebrokers/example-cluster-service-broker

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! 

Bruno,

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
             io.openshift.build.commit.id=fc35db5b2fe00bc912ae1468fda32ba5d46852fe
             io.openshift.build.commit.url=https://github.com/openshift/cluster-svcat-apiserver-operator/commit/fc35db5b2fe00bc912ae1468fda32ba5d46852fe

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.

https://access.redhat.com/errata/RHBA-2019:0758


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