Skip to content
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

Console UI fails to load for example mystreams service #32

Closed
dcberg opened this issue Jul 15, 2019 · 7 comments
Closed

Console UI fails to load for example mystreams service #32

dcberg opened this issue Jul 15, 2019 · 7 comments
Assignees

Comments

@dcberg
Copy link

dcberg commented Jul 15, 2019

I followed the instructions to create a service and binding for Streams (e.g., mystreams service instance). The service and binding are created. When I click on the mystreams service from the OCP cluster console I get an empty page which you cannot go back.

Looking in the web browser console I see the following error.

`WebSocket connection to 'wss://console.dan-rhos10-f0a5715bb2873122b708ede2bf765701-0001.us-east.containers.appdomain.cloud/api/kubernetes/apis/ibmcloud.ibm.com/v1alpha1/namespaces/default/services?watch=true&fieldSelector=metadata.name%3Dmystreams&x-csrf-token=XXXXXXXXXXXX' failed: WebSocket is closed before the connection is established.
o.destroy @ index.tsx:52'

@vazirim vazirim self-assigned this Jul 15, 2019
@vazirim
Copy link
Member

vazirim commented Jul 15, 2019

@dcberg could you share the yaml you used?

@vazirim
Copy link
Member

vazirim commented Jul 15, 2019

@dcberg I just tried the mystreams example we have in our samples.
It seems to provision fine, but I cannot access the web console. This isn't actually a problem with the cloud operator but the service itself. I asked on Slack to see if the service is down (in the past they have fixed stuff for us), cc'ed you there

@pdettori
Copy link
Member

I was able to reproduce the issue with a different service (watson translator) so this is not related to provisioning IBM Streaming Analytics. However, the issue seems to happen only with the console in 3.11, and it works fine in OpenShift 4. Will continue to explore to see what is affecting this.

@pdettori
Copy link
Member

so, I tested also with a Binding and the 3.11 console works fine for that. I have a strong suspicion at this point that there might be an issue with the 3.11 console due to the resource name 'Service' (it happens only with that). It is possible that the console is not considering the api group and version and is trying to find a native Kubernetes Service, so it hangs there. This does not happen with OpenShift 4, where the issue is likely resolved. Not sure there is a solution for this with the 3.11 console.

@pdettori
Copy link
Member

Following the steps in https://github.ibm.com/seed/olm/tree/master/pocs/openshift-ibmcloud#installing-upstream-openshift-console I have pointed a OpenShift 4 console to my ROKS cluster and verified that the issue does not happen there.

The conclusion is that this is a specific issue for the 3.11 console, where operator support was just experimental and it is likely due to the 3.11 console support not handling correctly the a resource with name Service (overlapping with the native Service in Kubernetes).

To point a v4 console to the existing 3.11 cluster, you may try to run the console locally in docker, as long as your oc command is setup:

endpoint=$(kubectl config view -o json | jq '{myctx: .["current-context"], ctxs: .contexts[], clusters: .clusters[]}' | jq 'select(.myctx == .ctxs.name)' | jq 'select(.ctxs.context.cluster ==  .clusters.name)' | jq '.clusters.cluster.server' -r)
token=$(kubectl config view -o json | jq '{myctx: .["current-context"], ctxs: .contexts[], clusters: .clusters[], users: .users[]}' | jq 'select(.myctx == .ctxs.name)' | jq 'select(.ctxs.context.user ==  .users.name)' | jq '.users.user.token' -r)

args="--net=host"
if [[ $OSTYPE == darwin* ]]; then
  args="-p 9000:9000"
fi

docker run --name console -d $args \
  -e BRIDGE_USER_AUTH="disabled" \
  -e BRIDGE_K8S_MODE="off-cluster" \
  -e BRIDGE_K8S_MODE_OFF_CLUSTER_ENDPOINT=$endpoint \
  -e BRIDGE_K8S_MODE_OFF_CLUSTER_SKIP_VERIFY_TLS=true \
  -e BRIDGE_K8S_AUTH="bearer-token" \
  -e BRIDGE_K8S_AUTH_BEARER_TOKEN=$token\
  quay.io/openshift/origin-console:latest

On OSX, you should be able to access to OpenShift 4 console at http://localhost:9000

@pdettori
Copy link
Member

View with the v4 console pointed to my ROKS instance:
image

@pdettori
Copy link
Member

Closing, since this issue cannot is caused by a OpenShift 3.11 UI issue.

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

No branches or pull requests

3 participants