[Ovirt-devel] [PATCH server] Fix anyterm for multinode support

Jason Guiditta jguiditt at redhat.com
Thu May 21 18:15:44 UTC 2009


On Thu, 2009-05-21 at 11:25 -0500, Mike McGrath wrote:
> Changed relative pathing issue for anyterm.js to work properly
> 
> Changed /proxy/anyterm-module so it gets piped through vmnodes:$1
> instead of through vmnodes:anyterm
> ---
>  conf/ovirt-server.conf               |    6 ++++--
>  src/app/controllers/vm_controller.rb |    2 +-
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/conf/ovirt-server.conf b/conf/ovirt-server.conf
> index 6e5eea9..62f2dd8 100644
> --- a/conf/ovirt-server.conf
> +++ b/conf/ovirt-server.conf
> @@ -23,8 +23,10 @@ NameVirtualHost AdminNetIpAddress:80
>  
>    RewriteEngine On
>    RewriteMap vmnodes prg:/usr/bin/ovirt-vm2node
> -  RewriteRule ^/terminal/(.*\.(js|css|gif)|proxy/anyterm-module)$ http://${vmnodes:anyterm}:81/$1 [P]
> -  RewriteRule ^/terminal/(.*)$ http://${vmnodes:$1}:81/anyterm.html?param=$1 [P,NE]
> +  RewriteRule ^/terminal/(.*)/(.*\.(js|css|gif))$ http://${vmnodes:anyterm}:81/$2 [P]
> +  RewriteRule ^/terminal/(.*)/proxy/anyterm-module$ http://${vmnodes:$1}:81/$1 [P]   
> +  RewriteRule ^/terminal/(.*)/$ http://${vmnodes:$1}:81/anyterm.html?param=$1 [P,NE] 
> +
>  
> 
>    ProxyPass /ovirt http://AdminNodeFQDN/ovirt retry=3
> diff --git a/src/app/controllers/vm_controller.rb b/src/app/controllers/vm_controller.rb
> index 4f38cc4..f0e10d7 100644
> --- a/src/app/controllers/vm_controller.rb
> +++ b/src/app/controllers/vm_controller.rb
> @@ -43,7 +43,7 @@ class VmController < ApplicationController
>      @vm = Vm.find(params[:id])
>      redirect_to "https://" + params[:host] +
>                  "/terminal/" + @vm.description +
> -                "?param=" + @vm.description
> +                "/?param=" + @vm.description
>    end
>  
>    def show

ACK, just tried this against one node, which works fine for me.  If
anyone else wants to test against multiple nodes, or has any issues with
me pushing this, let me know.  Otherwise, I'll push it by eod today.

-j




More information about the ovirt-devel mailing list