Bug 1373788
| Summary: | When master port is 443, oc start build by webhook from webconsole lost url port and failed with unknown signed certification. | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | XiaochuanWang <xiaocwan> |
| Component: | oc | Assignee: | Cesar Wong <cewong> |
| Status: | CLOSED ERRATA | QA Contact: | Xingxing Xia <xxia> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.3.0 | CC: | aos-bugs, bparees, jforrest, jokerman, mmccomas, pweil, tdawson |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: |
Cause:
Comparison of master host/port with that specified by the user fails because the user-specified URL may not contain the default port (when using 443).
Consequence:
The build fails to trigger.
Fix:
Fix the comparison of the host/port to account for default port.
Result:
Start build works when the master port is 443 and is using a self-signed certificate.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-01-18 12:53:42 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
XiaochuanWang
2016-09-07 07:19:04 UTC
443 is an optional port, it should not be required, it looks like there is a bug on oc start-build sorry didn't realize Cesar had a pull open for this: https://github.com/openshift/origin/pull/10836 Reproduced by same steps as comment 0 on latest origin which port is 8443, ami: rhel7_5101 oc/openshift v1.4.0-alpha.0+75ee6c9 Please refer to attachment for the full log. @XiaochuanWang I'm not sure that you reproduced the issue. If you logged in to the cluster and decided to skip certificate verification, then you will still get a certificate error when invoking start-build --from-webhook. However, if you are logged in with a valid certificate (oc login --certificate-authority=/path/to/ca.crt), then the webhook invocation should not complain about an invalid certificate. This part was working as long as the URL to the cluster had a port that was not 443. If the URL to the cluster had a 443 port, then you could reproduce this bug. Not reproduced on OCP openshift 3.3.1.1 Steps: 1. oc new-app https://raw.githubusercontent.com/openshift/origin/master/examples/sample-app/application-template-stibuild.json 2. Go to web console, go to build config page, check "Configuration" and copy the link of "Generic webhook URL" 3. oc start-build --from-webhook='https://xxx:8443/oapi/v1/namespaces/xiaocwan-sti/buildconfigs/ruby-sample-build/webhooks/secret101/generic' New build started, URL from web console is same with `oc describe bc`. (To compare:) # oc start-build --from-webhook='https://xxx/oapi/v1/namespaces/xiaocwan-sti/buildconfigs/ruby-sample-build/webhooks/secret101/generic' The connection to the server xxx.xxx.xxx.com was refused - did you specify the right host or port? Also not reproduced on OCP openshift/oc 3.3.1.1 with port 443 env, steps are same as Comment 6. 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-2017:0066 |