Che: [k8s plugin] Clusters view is empty

Created on 2 Oct 2019  Â·  12Comments  Â·  Source: eclipse/che

Describe the bug


Clusters view from Kubernetes plugin is empty although kubeconfig is set up correctly, see the terminal output
image

Che version

  • [ ] latest
  • [x] nightly
  • [ ] other: please specify

Steps to reproduce

  • Run a workspace with the latest version of Kubernetes plugin.
  • Inject kubeconfig into the running workspace with chectl workspace:inject -k command.
  • Refresh the tree. It's empty although kubectl get po output shows that kubeconfig has correct configuration.
  • Expected behavior


    Clusters tree should display clusters objects.

    Runtime

    • [ ] kubernetes (include output of kubectl version)
    • [ ] Openshift (include output of oc version)
    • [x] minikube (include output of minikube version and kubectl version)
    • [ ] minishift (include output of minishift version and oc version)
    • [ ] docker-desktop + K8S (include output of docker version and kubectl version)
    • [ ] other: (please specify)

    Screenshots

    Installation method

    • [x] chectl
    • [ ] che-operator
    • [ ] minishift-addon
    • [ ] I don't know

    Environment

    • [x] my computer

      • [ ] Windows

      • [x] Linux

      • [ ] macOS

    • [ ] Cloud

      • [ ] Amazon

      • [ ] Azure

      • [ ] GCE

      • [ ] other (please specify)

    • [ ] other: please specify

    Additional context

    areeditoche-theia severitP1

    Most helpful comment

    I confirm that it is fixed.
    note for self, need to inject kubeconfig using chectl server:inject or for now when being in multiuser (until this issue fixed):
    1/ Copy your local kubeconfig to the clipboard. Use kubectl config view --raw --flatten --minify to get it.
    2/ Paste the copied kubeconfig into the ~/.kube/config file into plugin sidecar (Right menu My Workspace -> Plugins -> vscode-kubernetes-xxx -> New Terminal) (can use vi to create the file content)
    3/ Refresh Clusters tree with Refresh button

    All 12 comments

    @azatsarynnyy it's not clear for me the area of the issue ?
    it's a problem in the vscode extension ? or the platform ?

    @benoitf I guess it's related to remote plugins since I've got the errors in theia sidecar like the following:

    root ERROR [hosted-plugin: 49] TypeError: Class constructor AbstractMessageReader cannot be invoked without 'new'
        at new WebSocketMessageReader (/tmp/theia-unpacked/task_plugin.theia/node_modules/vscode-ws-jsonrpc/lib/socket/reader.js:21:28)
        at Object.createWebSocketConnection (/tmp/theia-unpacked/task_plugin.theia/node_modules/vscode-ws-jsonrpc/lib/socket/connection.js:11:25)
        at ReconnectingWebSocket.webSocket.onOpen (/tmp/theia-unpacked/task_plugin.theia/lib/machine/websocket.js:99:57)
        at WebSocket.<anonymous> (/tmp/theia-unpacked/task_plugin.theia/lib/machine/websocket.js:36:19)
        at WebSocket.emit (events.js:198:13)
        at WebSocket.setSocket (/tmp/theia-unpacked/task_plugin.theia/node_modules/ws/lib/websocket.js:151:10)
        at ClientRequest.req.on (/tmp/theia-unpacked/task_plugin.theia/node_modules/ws/lib/websocket.js:602:10)
        at ClientRequest.emit (events.js:198:13)
        at Socket.socketOnData (_http_client.js:475:11)
        at Socket.emit (events.js:198:13)
    root ERROR Uncaught Exception:  Error: ENOENT: no such file or directory, unlink '/tmp/vscode-git-askpass-f1d64118faa3a36d2710f692ce6354067af65115.sock'
    root ERROR Error: ENOENT: no such file or directory, unlink '/tmp/vscode-git-askpass-f1d64118faa3a36d2710f692ce6354067af65115.sock'
        at Object.unlinkSync (fs.js:956:3)
        at Askpass.dispose (/tmp/vscode-unpacked/vscode-git-1.3.0.1.vsix/extension/out/askpass.js:89:16)
        at Disposable.disposable (/home/theia/node_modules/@theia/plugin-ext/lib/plugin/types-impl.js:82:40)
        at Disposable.dispose (/home/theia/node_modules/@theia/plugin-ext/lib/plugin/types-impl.js:101:18)
        at Disposable.context.subscriptions.push.vscode_1.Disposable [as disposable] (/tmp/vscode-unpacked/vscode-git-1.3.0.1.vsix/extension/out/main.js:94:103)
        at Disposable.dispose (/home/theia/node_modules/@theia/plugin-ext/lib/plugin/types-impl.js:101:18)
        at /home/theia/node_modules/@theia/plugin-ext/lib/common/disposable-util.js:24:52
        at Array.forEach (<anonymous>)
        at Object.dispose (/home/theia/node_modules/@theia/plugin-ext/lib/common/disposable-util.js:24:15)
        at PluginManagerExtImpl.stopPlugin (/home/theia/node_modules/@theia/plugin-ext/lib/plugin/plugin-manager.js:150:31)
    root ERROR [hosted-plugin: 49] Promise rejection not handled in one second: Error: Unknown actor OutputChannelRegistryMain
    With stack trace: Error: Unknown actor OutputChannelRegistryMain
        at RPCProtocolImpl.doInvokeHandler (/home/theia/node_modules/@theia/plugin-ext/lib/common/rpc-protocol.js:248:19)
        at RPCProtocolImpl.invokeHandler (/home/theia/node_modules/@theia/plugin-ext/lib/common/rpc-protocol.js:239:41)
        at RPCProtocolImpl.receiveRequest (/home/theia/node_modules/@theia/plugin-ext/lib/common/rpc-protocol.js:203:31)
        at RPCProtocolImpl.receiveOneMessage (/home/theia/node_modules/@theia/plugin-ext/lib/common/rpc-protocol.js:172:22)
        at /home/theia/node_modules/@theia/plugin-ext/lib/common/rpc-protocol.js:63:109
        at /home/theia/node_modules/@theia/plugin-ext/lib/common/rpc-protocol.js:279:17
        at /home/theia/node_modules/@theia/core/lib/common/event.js:162:33
        at CallbackList.invoke (/home/theia/node_modules/@theia/core/lib/common/event.js:177:39)
        at Emitter.fire (/home/theia/node_modules/@theia/core/lib/common/event.js:265:29)
        at ChildProcess.<anonymous> (/home/theia/node_modules/@theia/plugin-ext/lib/hosted/node/hosted-plugin-process.js:121:21)
    

    probably yes

    @benoitf @azatsarynnyy do you mean that it is a regression introduced by the pointed issues in monaco-language-client? or that it should be fixed by it?

    please note also that to have the Kubernetes icon on the left, I need to reload the page after creation of the workspace

    Hello @apupier

    do you mean that it is a regression introduced by the pointed issues in monaco-language-client? or that it should be fixed by it?

    likely that's caused by the pointed issue but should be already fixed by https://github.com/eclipse/che-theia/pull/468

    please note also that to have the Kubernetes icon on the left, I need to reload the page after creation of the workspace

    it looks like https://github.com/eclipse/che/issues/14611

    do you mean that it is a regression introduced by the pointed issues in monaco-language-client? or that it should be fixed by it?

    likely that's caused by the pointed issue but should be already fixed by eclipse/che-theia#468

    ok, what do I need to do to have the version with the fix picked up? Just launch another workspace? delete Che pod? call chectl server:delete and and chectl server:start?

    I deleted my minikube instance and recreatd everything.

    The Kubernetes commands are now available (after a refresh of the page).
    Unfortunately the view remains empty.
    There is no more related erro rin browser console log (I think). There is only:

    Uncaught (in promise) Error: Request 'resize' failed
        at Proxy.<anonymous> (theia.f7df060….js:1)
        at n.resizeTerminalProcess (theia.f7df060….js:1)
        at n.t.onUpdateRequest (theia.f7df060….js:1)
        at n.e.processMessage (vendors.5aa9655….js:63)
        at n.t.processMessage (theia.f7df060….js:1)
        at m (vendors.5aa9655….js:19)
        at n (vendors.5aa9655….js:19)
        at g (vendors.5aa9655….js:19)
    

    @apupier just make sure that your workspace is started with the next versions of Che Theia and K8s plugin images. If you deleted your minikube, obviously the newest images have to be downloaded.

    I've also checked it on my minikube. Probably it's really fixed by https://github.com/eclipse/che-theia/pull/468

    image

    Closing it as it works well with the next images versions. Feel free to reopen if it still reproduced.

    I confirm that it is fixed.
    note for self, need to inject kubeconfig using chectl server:inject or for now when being in multiuser (until this issue fixed):
    1/ Copy your local kubeconfig to the clipboard. Use kubectl config view --raw --flatten --minify to get it.
    2/ Paste the copied kubeconfig into the ~/.kube/config file into plugin sidecar (Right menu My Workspace -> Plugins -> vscode-kubernetes-xxx -> New Terminal) (can use vi to create the file content)
    3/ Refresh Clusters tree with Refresh button

    Was this page helpful?
    0 / 5 - 0 ratings

    Related issues

    sudheerherle picture sudheerherle  Â·  3Comments

    luckymore0520 picture luckymore0520  Â·  3Comments

    skabashnyuk picture skabashnyuk  Â·  3Comments

    Ohrimenko1988 picture Ohrimenko1988  Â·  3Comments

    sleshchenko picture sleshchenko  Â·  3Comments