Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1506502 - [TSB] Should not show openshift/templates on Catalog after TSB enabled
[TSB] Should not show openshift/templates on Catalog after TSB enabled
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer (Show other bugs)
3.7.0
Unspecified Unspecified
medium Severity medium
: ---
: 3.7.0
Assigned To: Scott Dodson
Yadan Pei
: Reopened
Depends On:
Blocks: 1534316
  Show dependency treegraph
 
Reported: 2017-10-26 04:55 EDT by Yadan Pei
Modified: 2018-01-14 21:06 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of:
: 1534316 (view as bug list)
Environment:
Last Closed: 2017-11-28 17:19: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 RHSA-2017:3188 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Container Platform 3.7 security, bug, and enhancement update 2017-11-28 21:34:54 EST

  None (edit)
Description Yadan Pei 2017-10-26 04:55:23 EDT
Description of problem:
Enable Template Service Broker in ansible installation, both clusterserviceclass and templates are shown on Catalog. Since TSB is enabled, templates in openshift namespace will be converted into clusterserviceclass, should not show template any more.

Version-Release number of selected component (if applicable):
v3.7.0-0.178.0
registry.ops.openshift.com/openshift3/ose-service-catalog              v3.7                de6ddbad97f8        25 hours ago        303.4 MB

How reproducible:
Always

Steps to Reproduce:
1.Setup OCP env with TSB enabled in ansible installation
$ oc get clusterserviceclass -o=custom-columns="id:.metadata.name,external name:spec.externalName" | grep 'cakephp'
5d3bec42-ba1a-11e7-8d6f-0e117aa1d07c   cakephp-mysql-persistent
5d41ef70-ba1a-11e7-8d6f-0e117aa1d07c   cakephp-mysql-example
2.Login to web console, search catalog with text 'cakephp'


Actual results:
2. 4 items filtered out and shown

Expected results:
2. Should only show 2 clusterserviceclass

Additional info:
Env set up by oc cluster up with same service-catalog image have no such issue.
Comment 1 John Matthews 2017-10-26 09:15:22 EDT
Jessica,  

I thought this might be a web-console issue, sound related to issue you raised in this mornings meeting.
Comment 2 Jessica Forrester 2017-10-26 09:31:30 EDT
I thought the ansible install was supposed to be setting up the console extension. That said we need to rename the config option the console uses either way based on the discussion this morning.
Comment 3 Samuel Padgett 2017-10-26 13:45:15 EDT
See also

https://github.com/openshift/origin/pull/17058
Comment 4 Jessica Forrester 2017-11-01 10:06:01 EDT
The flag is getting fixed in ansible in https://github.com/openshift/openshift-ansible/pull/5912
Comment 5 Jessica Forrester 2017-11-01 10:40:15 EDT
The build this bug was opened against was from before we changed the flag name, we are concerned the installer is not properly laying down / configuring the extension for the console. Need to investigate this more.
Comment 6 Jessica Forrester 2017-11-01 12:07:44 EDT
The ansible fix is merged and I can't see anything else wrong with the tasks for setting up the TSB. Can you re-test when there is a build that includes both of these PRs:

https://github.com/openshift/origin-web-console/pull/2387
https://github.com/openshift/openshift-ansible/pull/5912

If this is still happening we need to know:

1) The content of this file on disk on the masters
/etc/origin/master/openshift-ansible-catalog-console.js
2) The master-config.yaml setting for assetConfig -> extensionScripts
3) The content of the compiled extensions.js file loaded into the browser by the web console

After collecting the above, if openshift-ansible-catalog-console.js contains content that looks like:
window.OPENSHIFT_CONSTANTS.ENABLE_TECH_PREVIEW_FEATURE.template_service_broker = true;
AND assetConfig -> extensionScripts is set to pull that file
AND extensions.js does not have the same content, then:
1) Clear the browser cache and see if the content of extensions.js changes
2) If not, restart the master and see if the content of extensions.js changes
Comment 7 Yadan Pei 2017-11-01 23:15:07 EDT
Re-tested based on comment 6,

openshift-ansible-catalog-console.js and compiled extensions.js has the same content which is an old one.
window.OPENSHIFT_CONSTANTS.ENABLE_TECH_PREVIEW_FEATURE.template_service_broker = true;

Although pr 5912 is merged to openshift-ansible, not built into rpm package yet, that's probably why the issue happens.


Will test when we get new ansible packages.
Comment 8 Jessica Forrester 2017-11-02 09:13:32 EDT
Ok thats good news, since the JS file is getting setup and served correctly then getting the ansible update for the file contents should fix this.
Comment 10 Yadan Pei 2017-11-03 06:02:36 EDT
Checked on v3.7.0-0.190.0 with registry.reg-aws.openshift.com:443/openshift3/ose-service-catalog   v3.7.0-0.190.0      2a40aff211de        17 hours ago        266 MB


Templates are not shown this time

Move to VERIFIED
Comment 11 Yadan Pei 2017-11-10 01:47:53 EST
The issue reproduces on v3.7.5
registry.reg-aws.openshift.com:443/openshift3/ose-service-catalog     v3.7                ca30f0c47ab3        22 hours ago        266 MB


1. content of openshift-ansible-catalog-console.js
[root@host-172-16-120-76 ~]# cat /etc/origin/master/openshift-ansible-catalog-console.js 
window.OPENSHIFT_CONSTANTS.TEMPLATE_SERVICE_BROKER_ENABLED = true;


2. compiled extensions.js 
// empty file so that the master-config can still point to a file that exists
// this file will be replaced by the template service broker role if enabled
;

The v3.7.5 env is launched with openshift-ansible at master branch
Comment 12 Samuel Padgett 2017-11-10 08:57:06 EST
If you look at master-config.yaml, is openshift-ansible-catalog-console.js listed in the asset config extension scripts?
Comment 13 Samuel Padgett 2017-11-10 10:54:50 EST
I have a suspicion that the updated extension file is copied after the master has started, which means it isn't being picked up.
Comment 14 Yadan Pei 2017-11-13 01:43:20 EST
Yeah, extension scripts is set correctly 
  extensionScripts:
  - /etc/origin/master/openshift-ansible-catalog-console.js
Comment 15 Samuel Padgett 2017-11-13 08:31:03 EST
Extensions are only read on server startup. Right now the installer is copying an empty file and updating it later if TSB is enabled. The updated file appears to be copied after the master has started, however, which is why it's not taking effect. A workaround would be to restart master again.
Comment 16 ewolinet 2017-11-13 11:41:54 EST
@Sam,

Is the fix then for the template_service_broker role to restart the master after we update the extensions js file?
Comment 17 Samuel Padgett 2017-11-13 12:42:46 EST
Eric -- Yes, that should fix it.
Comment 18 Scott Dodson 2017-11-13 16:31:20 EST
https://github.com/openshift/openshift-ansible/pull/6101 in progress to fix that
Comment 19 Samuel Padgett 2017-11-14 08:50:42 EST
3.7 PR:

https://github.com/openshift/openshift-ansible/pull/6108
Comment 21 Yadan Pei 2017-11-15 02:58:55 EST
Fixed on latest ansible openshift-ansible-3.7.8-1

Move to VERIFIED
Comment 24 errata-xmlrpc 2017-11-28 17:19: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/RHSA-2017:3188

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