Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1583049

Summary: Cannot get asb_sandbox prometheus metrics
Product: OpenShift Container Platform Reporter: Zhang Cheng <chezhang>
Component: Service BrokerAssignee: Erik Nelson <ernelson>
Status: CLOSED ERRATA QA Contact: Zhang Cheng <chezhang>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.10.0CC: aos-bugs, ernelson, jiazha, jmatthew, zhsun, zitang
Target Milestone: ---   
Target Release: 3.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-10-11 07:20:02 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:
Embargoed:

Description Zhang Cheng 2018-05-28 07:33:55 UTC
Description of problem: 
Cannot get asb_sandbox prometheus metrics
Relate bug for your reference: https://bugzilla.redhat.com/show_bug.cgi?id=1577127#c1


service-catalog & asb image using images:
# service-catalog --version
v3.10.0-0.53.0;Upstream:v0.1.19
# asbd --version
1.2.14


How reproducible:
Always


Steps to Reproduce:
1. Deploy service catalog & ansible service broker by openshift ansible.
2. Check prometheus metrics of ASB by:
# oc login by chezhang user
# oc adm policy add-cluster-role-to-user cluster-debugger chezhang
# host=`oc get route -n openshift-ansible-service-broker | grep -v NAME | awk '{print $2}'`
#  curl -k -H "Authorization: bearer `oc whoami -t`" https://${host}/metrics | grep -i ^asb
3. Provision or Dprovision a serviceinstance, and check prometheus metrics of ASB by:
#  curl -k -H "Authorization: bearer `oc whoami -t`" https://${host}/metrics | grep -i ^asb


Actual results:  
3. asb_sandbox always is "0" due to the bundle-lib refactor.


Expected results: 
2. Should get correct asb_sandbox metrics.


Addition info: 
None

Comment 1 Zhang Cheng 2018-05-28 07:37:27 UTC
Set target release to 3.11 base on Shawn's comments in https://bugzilla.redhat.com/show_bug.cgi?id=1577127#c1

Please correct me if I have any mistake. Thanks.

Comment 2 Erik Nelson 2018-08-08 18:32:13 UTC
Implements initial bundle-lib metrics (bundlelib_sandbox guage):
https://github.com/automationbroker/bundle-lib/pull/161
https://github.com/openshift/ansible-service-broker/pull/1034

Note: this is not part of the asb subsystem, it will display as "bundlelib_sandbox". It will also only be incremented while the sandbox is present (they are deleted following an APB run).

Comment 3 David Zager 2018-08-15 19:41:58 UTC
Errata updated https://errata.devel.redhat.com/advisory/33505:

openshift-enterprise-mariadb-apb-v3.11.0-0.16.0.1
openshift-enterprise-mediawiki-apb-v3.11.0-0.16.0.1
openshift-enterprise-postgresql-apb-v3.11.0-0.16.0.1
openshift-enterprise-mysql-apb-v3.11.0-0.16.0.1
openshift-enterprise-asb-container-v3.11.0-0.16.0.1

Comment 5 Erik Nelson 2018-08-16 13:27:18 UTC
Zhang, I see you're grepping for '^asb', it is not part of this subsystem so it would not appear in that query. See comment 2.

Please retest and grep for 'bundlelib'

Comment 8 Zhang Cheng 2018-08-20 06:27:56 UTC
Changing status to Verified base on comment 6 & comment 7

Comment 10 errata-xmlrpc 2018-10-11 07:20:02 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-2018:2652