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

Bug 1577797

Summary: Should update the k8s apiserver lib of ASB
Product: OpenShift Container Platform Reporter: Jian Zhang <jiazha>
Component: Service BrokerAssignee: Jesus M. Rodriguez <jesusr>
Status: CLOSED ERRATA QA Contact: Jian Zhang <jiazha>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.10.0CC: aos-bugs, chezhang, 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:00 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 Jian Zhang 2018-05-14 07:14:47 UTC
Description of problem:
Get below errors:
ERROR: logging before flag.Parse: I0514 06:50:37.750385       1 serve.go:89] Serving securely on [::]:1338

Seems like this a Golang issue and have fixed in k8s, here: 
https://github.com/kubernetes/kubernetes/issues/17162. So, we need to update the vendor lib. Such as:
vendor/k8s.io/apiserver/pkg/server/serve.go

Version-Release number of selected component (if applicable):
The ASB version: 1.2.10

How reproducible:
always

Steps to Reproduce:
1. Install the ASB.
[root@qe-jiazha-14master-etcd-1 ~]# oc get pods
NAME          READY     STATUS    RESTARTS   AGE
asb-4-bjwx6   1/1       Running   0          17m

2. Check its logs
# oc logs -f asb-4-bjwx6

Actual results:
Get the error info:
ERROR: logging before flag.Parse: I0514 06:50:37.750385       1 serve.go:89] Serving securely on [::]:1338

Expected results:
Do NOT display this kind of error info.

Additional info:

Comment 1 John Matthews 2018-05-15 19:36:37 UTC
Issue relates to 2 different flag parsing libraries being used.  

I'm not aware of any impacts to functional behavior and am aligning this BZ to later release to re-examine as the impact right now looks to just be a misleading log message.

Comment 2 Jian Zhang 2018-05-16 01:59:40 UTC
John,

Yes, you're right. It's just a misleading log message. But, I think it's better to fix it soon.

Comment 3 Jesus M. Rodriguez 2018-08-02 20:40:08 UTC
Fixed by PR https://github.com/openshift/ansible-service-broker/pull/1027

Comment 4 Jesus M. Rodriguez 2018-08-02 20:44:39 UTC
before the change:

time="2018-08-02T17:09:55Z" level=debug msg="Creating k8s apiserver"
time="2018-08-02T17:09:55Z" level=info msg="Listening on https://[::]:1338"
time="2018-08-02T17:09:55Z" level=info msg="Ansible Service Broker Starting"
ERROR: logging before flag.Parse: I0802 17:09:55.506008       1 serve.go:89] Serving securely on [::]:1338
time="2018-08-02T17:12:25Z" level=debug msg="Unable to find originating origin header"
time="2018-08-02T17:12:25Z" level=info msg="Request: \"GET /automation-broker/v2/catalog HTTP/1.1\\r\\nHost: automation-broker.automation-broker.svc:1338\\r\\nAccept-Encoding: gzip\\r\\nUser-Agent: Go-http-client/1.1\\r\\nX-Broker-Api-Version: 2.13\\r\\n\\r\\n\""
time="2018-08-02T17:12:25Z" level=info msg="AnsibleBroker::Catalog"


after the change:


time="2018-08-02T20:19:41Z" level=debug msg="Creating k8s apiserver"
time="2018-08-02T20:19:41Z" level=info msg="Listening on https://[::]:1338"
time="2018-08-02T20:19:41Z" level=info msg="Ansible Service Broker Starting"
time="2018-08-02T20:22:08Z" level=debug msg="Unable to find originating origin header"
time="2018-08-02T20:22:08Z" level=info msg="Request: \"GET /automation-broker/v2/catalog HTTP/1.1\\r\\nHost: automation-broker.automation-broker.svc:1338\\r\\nAccept-Encoding: gzip\\r\\nUser-Agent: Go-http-client/1.1\\r\\nX-Broker-Api-Version: 2.13\\r\\n\\r\\n\""


Notice how it no longer prints:

ERROR: logging before flag.Parse: I0802 17:09:55.506008       1 serve.go:89] Serving securely on [::]:1338

Comment 6 Jian Zhang 2018-08-09 05:12:46 UTC
Verify it, LGTM, I don't see the "Error" logs anymore, thanks!
The ASB version: 1.3.7

Running the `asbd` and parse the args correctly.
[root@qe-jiazha-round2master-etcd-1 ~]# oc rsh asb-3-nsz92
sh-4.2$ asbd
============================================================
==           Creating Ansible Service Broker...           ==
============================================================
INFO[0000] Ansible Service Broker Version: 1.3.7        
INFO[0000] Initializing clients...                      
DEBU[0000] Connecting to Cluster   
...

sh-4.2$ asbd --help
Usage:
  asbd [OPTIONS]

Application Options:
  -c, --config=  Config File (default: /etc/ansible-service-broker/config.yaml)
  -v, --version  Print version information

Help Options:
  -h, --help     Show this help message

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