cockpit-project / console.dot

Webconsole Cloud Service
2 stars 3 forks source link

appservice: Add session placeholder page #48

Closed martinpitt closed 2 years ago

martinpitt commented 2 years ago

Connecting to non-running sessions won't work and just cause a page hang. Instead, show a stub page which waits for the session to go into state "running", and then reloads itself to show cockpit.

Fixes #44 Fixes #50

jelly commented 2 years ago

On rhel-8-8 it currently seems to fail:

Unrelated to PR

  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 951, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 894, in _find_spec
  File "<frozen importlib._bootstrap_external>", line 1157, in find_spec
  File "<frozen importlib._bootstrap_external>", line 1131, in _get_spec
  File "<frozen importlib._bootstrap_external>", line 1112, in _legacy_get_spec
  File "<frozen importlib._bootstrap>", line 441, in spec_from_loader
  File "<frozen importlib._bootstrap_external>", line 544, in spec_from_file_location
  File "/tmp/cockpit-bridge-websocket-connector.pyz/websockets/__init__.py", line 1
SyntaxError: future feature annotations is not defined
[root@rhel-8-8-127-0-0-2-2201 ~]# /tmp/cockpit-bridge-websocket-connector.pyz --basic-auth admin:foobar -k wss://_gateway:8443/wss/webconsole/v1/sessions/22620cd9-c866-4cfb-8433-d472ade4bd94/ws
martinpitt commented 2 years ago

@jelly: Yes, see issue #53. I just sent PR #56 to fix that.

jelly commented 2 years ago

Something is wrong with my setup as with my fedora-37 test VM it does seem to connect to the appservice but the web page reports "connection failed"

WebSocket connection to 'wss://localhost:8443/wss/webconsole/v1/sessions/c4f86ff0-04f6-49ea-8b67-84a667e16b88/web/cockpit/socket' failed:

This occurs on main too, so needs some investigation on my machine...