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

2013-11-13 Thread Daniel Molina
Hi Stefan,

comments inline

On 13 November 2013 10:11, Stefan Kooman  wrote:

> 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).
>
>
It makes sense, I have created a ticket to add this parameter
http://dev.opennebula.org/issues/2454



> 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.
>

Yes, the documentation should include that you have to generate the lock
file, otherwise the sunstone-server will not work, or modify the code to
include one of your suggestions. (patches are more than welcome)


>
> 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.
>

You are right, the dir should not be recreated if it already exists
http://dev.opennebula.org/issues/2455


>
> 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].
>

Yes, it is recommended since it uses some optimized C code instead of
python. I will include it in the docs.

Thank you for your great feedback


>
> 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 / i...@bit.nl
>
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iF4EAREIAAYFAlKDQkEACgkQTyGgYdFIOcZeLAEAiRmrySJ9GHtyVjyIepIJ77ct
> 2abudHSLdsPLFzXNavcBAJ3SQn5mFkOtZCBSx9KehF16/HqMpA7Hh0D4SebulA4q
> =IJTP
> -END PGP SIGNATURE-
>
> ___
> Users mailing list
> Users@lists.opennebula.org
> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>


-- 
--
Daniel Molina
Project Engineer
OpenNebula - Flexible Enterprise Cloud Made Simple
www.OpenNebula.org | dmol...@opennebula.org | @OpenNebula
___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org


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

2013-11-13 Thread Stefan Kooman
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 / i...@bit.nl


signature.asc
Description: Digital signature
___
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org