Bug 1963053
Summary: | `oc whoami --show-console` should show the web console URL, not the server api URL | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Jian Zhang <jiazha> |
Component: | oc | Assignee: | Maciej Szulik <maszulik> |
oc sub component: | oc | QA Contact: | zhou ying <yinzhou> |
Status: | CLOSED ERRATA | Docs Contact: | |
Severity: | high | ||
Priority: | medium | CC: | aos-bugs, maszulik, mfojtik |
Version: | 4.8 | Keywords: | Reopened |
Target Milestone: | --- | ||
Target Release: | 4.10.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | No Doc Update | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2022-03-11 18:15:11 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
2021-05-21 09:37:08 UTC
This is working as designed, see the output from oc: $ ./oc --loglevel=8 whoami --show-console I0521 06:14:12.881532 102149 loader.go:372] Config loaded from file: /kubeconfig I0521 06:14:12.882970 102149 round_trippers.go:432] GET https://api.example.com:6443/api/v1/namespaces/openshift-config-managed/configmaps/console-public I0521 06:14:12.882998 102149 round_trippers.go:438] Request Headers: I0521 06:14:12.883003 102149 round_trippers.go:442] User-Agent: oc/4.8.0 (linux/amd64) kubernetes/629bdbe I0521 06:14:12.883008 102149 round_trippers.go:442] Accept: application/json, */* I0521 06:14:13.040692 102149 round_trippers.go:457] Response Status: 404 Not Found in 157 milliseconds we're trying to read console address, but since the configmap which should contain that address was removed, oc can't and falls back to printing API endpoint. Hi Maciej, Sorry for the late reply, I missed it. > we're trying to read console address, but since the configmap which should contain that address was removed, oc can't and falls back to printing API endpoint Which configmap? Could you help explain more? Thanks! I tried it whit the latest `oc`, it works well. I changed the status to VERIFIED, please let me know if any concerns, thanks! [cloud-user@preserve-olm-env jian]$ oc version Client Version: 4.10.0-0.nightly-2021-11-04-001635 Server Version: 4.10.0-0.nightly-2021-11-23-133134 Kubernetes Version: v1.22.1+8e73d6b [cloud-user@preserve-olm-env jian]$ oc --loglevel=8 whoami --show-console I1123 22:10:44.023142 367364 loader.go:372] Config loaded from file: /data/jian/24-kubeconfig I1123 22:10:44.024343 367364 round_trippers.go:432] GET https://api.qe-daily-1124.qe.devcluster.openshift.com:6443/api/v1/namespaces/openshift-config-managed/configmaps/console-public I1123 22:10:44.024381 367364 round_trippers.go:438] Request Headers: I1123 22:10:44.024389 367364 round_trippers.go:442] Accept: application/json, */* I1123 22:10:44.024402 367364 round_trippers.go:442] User-Agent: oc/4.10.0 (linux/amd64) kubernetes/b241000 I1123 22:10:44.314502 367364 round_trippers.go:457] Response Status: 200 OK in 290 milliseconds I1123 22:10:44.314528 367364 round_trippers.go:460] Response Headers: I1123 22:10:44.314533 367364 round_trippers.go:463] X-Kubernetes-Pf-Prioritylevel-Uid: 7d7f1323-a1ba-4db4-8e0d-96e15f381d63 I1123 22:10:44.314537 367364 round_trippers.go:463] Content-Length: 516 I1123 22:10:44.314550 367364 round_trippers.go:463] Date: Wed, 24 Nov 2021 03:13:19 GMT I1123 22:10:44.314557 367364 round_trippers.go:463] Audit-Id: b96e23e7-b5f3-47c0-b762-0e255d109149 I1123 22:10:44.314570 367364 round_trippers.go:463] Cache-Control: no-cache, private I1123 22:10:44.314574 367364 round_trippers.go:463] Content-Type: application/json I1123 22:10:44.314581 367364 round_trippers.go:463] X-Kubernetes-Pf-Flowschema-Uid: 5b56a28f-b067-45e6-a71a-3fa102e17fb3 I1123 22:10:44.314636 367364 request.go:1181] Response Body: {"kind":"ConfigMap","apiVersion":"v1","metadata":{"name":"console-public","namespace":"openshift-config-managed","uid":"ad3cba11-865a-402a-a8cd-295dc85bf5b5","resourceVersion":"24000","creationTimestamp":"2021-11-23T23:24:55Z","managedFields":[{"manager":"console","operation":"Update","apiVersion":"v1","time":"2021-11-23T23:24:55Z","fieldsType":"FieldsV1","fieldsV1":{"f:data":{".":{},"f:consoleURL":{}}}}]},"data":{"consoleURL":"https://console-openshift-console.apps.qe-daily-1124.qe.devcluster.openshift.com"}} https://console-openshift-console.apps.qe-daily-1124.qe.devcluster.openshift.com Hi Maciej, Got it, thanks for your explanation! |