Skip to content

Commit

Permalink
Bug #896997: nova-vncproxy's flash socket policy port is not configur…
Browse files Browse the repository at this point in the history
…able

Add flags called vncproxy_flash_socket_policy_port and
vncproxy_flash_socket_policy_host, to allow the admin to configure
the Flash socket policy listener.

Change-Id: If42839ccd86f1c8723221049d7c76b6f5ad0aa2d
  • Loading branch information
Ewan Mellor committed Nov 30, 2011
1 parent a83e83a commit 43214c6
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
1 change: 1 addition & 0 deletions doc/source/runnova/index.rst
Expand Up @@ -87,4 +87,5 @@ Advanced Topics

flags
monitoring
vncconsole

20 changes: 13 additions & 7 deletions doc/source/runnova/vncconsole.rst
Expand Up @@ -46,27 +46,33 @@ is properly installed.

By default, nova-vncproxy binds 0.0.0.0:6080. This can be configured with:

* --vncproxy_port=[port]
* --vncproxy_host=[host]
* :option:`--vncproxy_port=[port]`
* :option:`--vncproxy_host=[host]`

It also binds a separate Flash socket policy listener on 0.0.0.0:843. This
can be configured with:

* :option:`--vncproxy_flash_socket_policy_port=[port]`
* :option:`--vncproxy_flash_socket_policy_host=[host]`


Enabling VNC Consoles in Nova
-----------------------------
At the moment, VNC support is supported only when using libvirt. To enable VNC
Console, configure the following flags:

* --vnc_console_proxy_url=http://[proxy_host]:[proxy_port] - proxy_port
defaults to 6080. This url must point to nova-vncproxy
* --vnc_enabled=[True|False] - defaults to True. If this flag is not set your
instances will launch without vnc support.
* :option:`--vnc_console_proxy_url=http://[proxy_host]:[proxy_port]` -
proxy_port defaults to 6080. This url must point to nova-vncproxy
* :option:`--vnc_enabled=[True|False]` - defaults to True. If this flag is
not set your instances will launch without vnc support.


Getting an instance's VNC Console
---------------------------------
You can access an instance's VNC Console url in the following methods:

* Using the direct api:
eg: 'stack --user=admin --project=admin compute get_vnc_console instance_id=1'
eg: '``stack --user=admin --project=admin compute get_vnc_console instance_id=1``'
* Support for Dashboard, and the Openstack API will be forthcoming


Expand Down
8 changes: 6 additions & 2 deletions nova/vnc/server.py
Expand Up @@ -39,6 +39,10 @@
'Port that the VNC proxy should bind to')
flags.DEFINE_string('vncproxy_host', '0.0.0.0',
'Address that the VNC proxy should bind to')
flags.DEFINE_integer('vncproxy_flash_socket_policy_port', 843,
'Port that the socket policy listener should bind to')
flags.DEFINE_string('vncproxy_flash_socket_policy_host', '0.0.0.0',
'Address that the socket policy listener should bind to')
flags.DEFINE_integer('vnc_token_ttl', 300,
'How many seconds before deleting tokens')
flags.DEFINE_string('vncproxy_manager', 'nova.vnc.auth.VNCProxyAuthManager',
Expand Down Expand Up @@ -77,8 +81,8 @@ def get_wsgi_server():
host=FLAGS.vncproxy_host,
port=FLAGS.vncproxy_port)
wsgi_server.start_tcp(handle_flash_socket_policy,
843,
host=FLAGS.vncproxy_host)
host=FLAGS.vncproxy_flash_socket_policy_host,
port=FLAGS.vncproxy_flash_socket_policy_port)
return wsgi_server


Expand Down

0 comments on commit 43214c6

Please sign in to comment.