[one-users] Various issues novnc-server / websockify

Stefan Kooman stefan at bit.nl
Wed Nov 13 01:11:29 PST 2013


Hi list,

Currently there is no option to enable IPv6 for novnc-server
(websockify) although websockify supports this. I've made a little
(dirty) hack to enable IPv6 for websockify:

--- /root/OpenNebulaVNC.rb      2013-11-08 21:37:13.958535135 +0100
+++ /usr/lib/one/ruby/OpenNebulaVNC.rb  2013-11-09 22:08:12.951812886 +0100
@@ -70,7 +70,7 @@
 
         @pipe = nil
         @token_folder = File.join(VAR_LOCATION, opts[:token_folder_name])
-        @proxy_path   = File.join(SHARE_LOCATION, "websockify/websocketproxy.py")
+        @proxy_path   = File.join(SHARE_LOCATION, "websockify/websocketproxy.py -6")
         @proxy_port   = config[:vnc_proxy_port]
 
         @wss = config[:vnc_proxy_support_wss]

If sunstone is reachable over IPv6 your clients might want to reach the
websockify port over IPv6 as well, if they want to make a VNC
connection. It would be nice to have a config option in
sunstone-server.conf to influence this behaviour (i.e :vnc_proxy_ipv6:
yes/no).

One of the hints in documentation [1] debugging novnc-server /
websockify is to run it on a console. But if you do this sunstone will
give an error message "VNC server is not running" and will refuse to
initiate a vnc session. Sure, you can hack your way around this but it
would be nice if either the check in OpenNebulaVNC.rb would be adjusted
to figure out if there's really nothing listening on vnc port (instead
of depending on lock file) or include a "debug" option so it skips this
check altogether.

Another thing biting me are the functions in OpenNebulaVNC.rb creating
and removing the sunstone_vnc_tokens directory. The directory is created
with oneadmin as owner and group. If you're running sunstone with Apache
Passenger it depends on the user you're running passenger with if it's
able to write new tokens or not. Documentation assumes passenger runs
as user www-data [2] (although you can easily change that). With the
default configuration passenger is not allowed to write tokens in that
directory and an error will be thrown. It would be nice if OpenNebulaVNC
could check what user passenger runs as, and create the directory
accordingly. What is the reason this directory should be created "on the fly"
anyway? It seems to complicate things a bit.

Finally, when running "websockify" on command line in "debug" mode it gives the
folllowing warning:

"WARNING: no 'numpy' module, HyBi protocol is slower or disabled
WebSocket server settings"

Is python-numpy indeed a "performance accelerator" in this case? If so,
I think this should be (at least) a (recommended) dependency for
sunstone. Documentation does mention python-numby so I guess it does
help [1].

Cheers,

Stefan

[1]: http://opennebula.org/documentation:rel4.2:sunstone
[2]: http://opennebula.org/documentation:rel4.2:suns_advance


-- 
| BIT BV  http://www.bit.nl/        Kamer van Koophandel 09090351
| GPG: 0xD14839C6                   +31 318 648 688 / info at bit.nl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 230 bytes
Desc: Digital signature
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20131113/99ae563c/attachment.pgp>


More information about the Users mailing list