Skip to content

Open console command doesn't open the console web page. #1247

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sudhirverma opened this issue Oct 23, 2019 · 14 comments · Fixed by #1248
Closed

Open console command doesn't open the console web page. #1247

sudhirverma opened this issue Oct 23, 2019 · 14 comments · Fixed by #1248

Comments

@sudhirverma
Copy link
Contributor

sudhirverma commented Oct 23, 2019

Open console command doesn't open the console web page.

for login: using oc login -u developer -p developer https://api.crc.testing:6443 command and using latest crc.

Openshift version: 4.x

@sudhirverma sudhirverma self-assigned this Oct 23, 2019
@mohitsuman
Copy link
Collaborator

mohitsuman commented Oct 23, 2019

@sudhirverma It works for me when running CRC 1.0.0. What are you using to run OpenShift ?
And on which platform is the extension running ?

@sudhirverma
Copy link
Contributor Author

@mohitsuman I am using

crc version: 1.0.0+575079b
OpenShift version: 4.2.0 (embedded in binary)

https://github.com/code-ready/crc/releases/tag/1.0.0

@mohitsuman
Copy link
Collaborator

Do you mean the issue is while using command palette?

Please update the description accordingly.

@jrichter1
Copy link
Contributor

Just tried this with an actual 4.2 cluster (not CRC). The thing is, the login URL is completely different to the console URL. And all the tooling does is slap /console at the end of the login URL.
So I ended up on a non-existent API endpoint

{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {
    
  },
  "status": "Failure",
  "message": "forbidden: User \"system:anonymous\" cannot get path \"/console\"",
  "reason": "Forbidden",
  "details": {
    
  },
  "code": 403
}

@jrichter1
Copy link
Contributor

Just for reference:

  • the console URL format is https://console-openshift-console.apps.openshift4-${cluster-hostname}
  • the login (API) URL https://api.openshift4-${cluster-hostName}:6443

@jeffmaury
Copy link
Member

You should ask @adietish because the console URL must be retrieved from configMap for OCP 4 and he did the job for openshift-rest-client.

@sudhirverma
Copy link
Contributor Author

sudhirverma commented Oct 23, 2019

I will use oc get configmaps console-public -n openshift-config-managed -o json to get Web console URL for Openshift 4.x url

@mohitsuman
Copy link
Collaborator

mohitsuman commented Oct 25, 2019

@sudhirverma The console url from Tree node action works correctly. It also works from the command palette. Are you trying this for 3.x or 4.x cluster ? As per your PR, it is for 3.x and issue has 4.x mentioned. Please clarify and update.

@mohitsuman
Copy link
Collaborator

mohitsuman commented Oct 25, 2019

Just tried this with an actual 4.2 cluster (not CRC). The thing is, the login URL is completely different to the console URL. And all the tooling does is slap /console at the end of the login URL.
So I ended up on a non-existent API endpoint

{
  "kind": "Status",
  "apiVersion": "v1",
  "metadata": {
    
  },
  "status": "Failure",
  "message": "forbidden: User \"system:anonymous\" cannot get path \"/console\"",
  "reason": "Forbidden",
  "details": {
    
  },
  "code": 403
}

@jrichter1
The tooling does take into account the correct console url for 4.x cluster. I tried with an actual one and a CRC one, both the console urls generated are correct. It fetches the url from the route of the openshift-console namespace.

For 3.x cluster, it directly appends the /console to the serverUrl generated.

@jrichter1
Copy link
Contributor

The tooling does take into account the correct console url for 4.x cluster. I tried with an actual one and a CRC one, both the console urls generated are correct. It fetches the url from the route of the openshift-console namespace.

For 3.x cluster, it directly appends the /console to the serverUrl generated.

The result above is not me trying to explain the inner workings of the extension, that's what it actually opened up when I selected 'Open Console Dashboard' from the context menu.

I mean https://api.openshift4-crs.crs.codereadyqe.com:6443/console is definitely not the correct URL it should have opened.

@mohitsuman
Copy link
Collaborator

mohitsuman commented Oct 25, 2019

I am curious why this is happening. I just checked for 2 different clusters. Do you have the instance of OpenShift I can connect and test that again, if it is up and running.

I guess it might then be skipping the condition check and not waiting for the result. Need to investigate here.

@sudhirverma
Copy link
Contributor Author

The console url from Tree node action works correctly. It also works from the command palette. Are you trying this for 3.x or 4.x cluster ? As per your PR, it is for 3.x and issue has 4.x mentioned. Please clarify and update.

I have already mentioned in description it's related to 4.x.

@mohitsuman
Copy link
Collaborator

The console url from Tree node action works correctly. It also works from the command palette. Are you trying this for 3.x or 4.x cluster ? As per your PR, it is for 3.x and issue has 4.x mentioned. Please clarify and update.

I have already mentioned in description it's related to 4.x.

Yeah read above please. Your PR relates to fix in 3.x cluster. And can you pass me the url you are trying to connect here, if it is not CRC one.

@sudhirverma
Copy link
Contributor Author

It's worked fine if we login as kubeadmin but it doesn't work when we login with oc login -u developer -p developer https://api.crc.testing:6443 for 4.x cluster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants