Serial proxy service and API broken by design

Bug #1373950 reported by Nikola Đipanov
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Critical
Sahid Orentino

Bug Description

As part of the blueprint https://blueprints.launchpad.net/nova/+spec/serial-ports we introduced an API extension and a websocket proxy binary. The problem with the 2 is that a lot of the stuff was copied verbatim from the novnc-proxy API and service which relies heavily on the internal implementation details of NoVNC and python-websockify libraries.

We should not ship a service that will proxy websocket traffic if we do not acutally serve a web-based client for it (in the NoVNC case, it has it's own HTML5 VNC implementation that works over ws://). No similar thing was part of the proposed (and accepted) implementation. The websocket proxy based on websockify that we currently have actually assumes it will serve static content (which we don't do for serial console case) which will then when excuted in the browser initiate a websocket connection that sends the security token in the cookie: field of the request. All of this is specific to the NoVNC implementation (see: https://github.com/kanaka/noVNC/blob/e4e9a9b97fec107b25573b29d2e72a6abf8f0a46/vnc_auto.html#L18) and does not make any sense for serial console functionality.

The proxy service was introduced in https://review.openstack.org/#/c/113963/

In a similar manner - the API that was proposed and implemented (in https://review.openstack.org/#/c/113966/) that gives us back the URL with the security token makes no sense for the same reasons outlined above.

We should revert at least these 2 patches before the final Juno release as we do not want to ship a useless service and commit to a useles API method.

We could then look into providing similar functionality through possibly something like https://github.com/chjj/term.js which will require us to write a different proxy service.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/124062

Changed in nova:
assignee: nobody → Nikola Đipanov (ndipanov)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.openstack.org/124063

Revision history for this message
Nikola Đipanov (ndipanov) wrote :
Revision history for this message
Sahid Orentino (sahid-ferdjaoui) wrote :

websockify can handles plain ws, we should fix a too restrictive implementation has suggested here:

  https://review.openstack.org/#/c/124384/

I made some test with a spartiate client
  https://gist.githubusercontent.com/sahid/894c31f306bebacb2207/raw/7f6dc08cf9bec604ce6c5b188d1a55e824094993/client.py

Changed in nova:
assignee: Nikola Đipanov (ndipanov) → sahid (sahid-ferdjaoui)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/124384
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=1dda5ef75a5c141c316639716820b0c37773a9e3
Submitter: Jenkins
Branch: master

commit 1dda5ef75a5c141c316639716820b0c37773a9e3
Author: Sahid Orentino Ferdjaoui <email address hidden>
Date: Thu Sep 25 17:11:56 2014 +0200

    console: make websocketproxy handles token from path

    As part of the blueprint serial-ports when connecting to
    the proxy with a plain websocket, make Nova able to retrieve
    the token from the request path.

    Closes-Bug: #1373950
    Change-Id: I0b0b23c954dbb812acfa7616696445c0e167d2c8

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
Thierry Carrez (ttx) wrote :
Changed in nova:
status: Fix Committed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Reviewed: https://review.openstack.org/124385
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=48e94bf75ce2be50d323e8b883cf3322c4d06c4e
Submitter: Jenkins
Branch: master

commit 48e94bf75ce2be50d323e8b883cf3322c4d06c4e
Author: Sahid Orentino Ferdjaoui <email address hidden>
Date: Thu Sep 25 17:15:10 2014 +0200

    cmd: update the default behavior of serial console

    When using serial console we are expecting using a plain websocket
    so we should to return the 'ws://' scheme as the default one, also
    it makes no sense to handle webserving content since currently
    nothing has been implemented in favor of this case.

    DocImpact: The 'base_url' option serial_console has been updated
    Closes-Bug: #1373950
    Change-Id: I0d0e4f7060febec5e0a357cd3e8c05486f2afaa5

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on nova (master)

Change abandoned by Nikola Dipanov (<email address hidden>) on branch: master
Review: https://review.openstack.org/124062
Reason: We've managed to fix it so abandoning the revert - see bug for details

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Change abandoned by Nikola Dipanov (<email address hidden>) on branch: master
Review: https://review.openstack.org/124063
Reason: We've managed to fix it so abandoning the revert - see bug for details

Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: juno-rc1 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.