Fixes #37761 - use ProxyPass and upgrade=websocket where possible #1662
Annotations
10 errors
Run tests:
spec/classes/foreman_config_apache_spec.rb#L44
foreman::config::apache on debian-11-x86_64 configures the HTTP vhost
Failure/Error:
should contain_apache__vhost('foreman')
.with_ip(nil)
.with_servername(facts[:fqdn])
.with_serveraliases([])
.with_add_default_charset('UTF-8')
.with_docroot('/usr/share/foreman/public')
.with_priority('05')
.with_options(['SymLinksIfOwnerMatch'])
.with_port(80)
.with_custom_fragment(%r{^<LocationMatch "\^/\(assets\|webpack\)">$})
expected that the catalogue would contain Apache::Vhost[foreman] with proxy_pass set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}} but it is set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}, and parameter rewrites set to [{"comment"=>"Upgrade Websocket connections", "rewrite_cond"=>"%{HTTP:Upgrade} =websocket [NC]", "rewrite_rule"=>"/(.*) unix:///run/foreman.sock|ws://foreman/$1 [P,L]"}] but it is set to []
Diff:
@@ -1,4 +1,2 @@
-{"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}}
-
-{"comment"=>"Upgrade Websocket connections", "rewrite_cond"=>"%{HTTP:Upgrade} =websocket [NC]", "rewrite_rule"=>"/(.*) unix:///run/foreman.sock|ws://foreman/$1 [P,L]"}
+{"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}
|
Run tests:
spec/classes/foreman_config_apache_spec.rb#L156
foreman::config::apache on debian-11-x86_64 with asset proxying enabled is expected to contain Apache::Vhost[foreman] with proxy_pass => {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}}
Failure/Error:
it { should contain_apache__vhost('foreman')
.with_proxy_pass(
"no_proxy_uris" => ['/pulp', '/pub', '/icons', '/images', '/server-status'],
"path" => '/',
"url" => 'unix:///run/foreman.sock|http://foreman/',
"params" => { "retry" => '0' },
)
}
expected that the catalogue would contain Apache::Vhost[foreman] with proxy_pass set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}} but it is set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}
|
Run tests:
spec/classes/foreman_config_apache_spec.rb#L184
foreman::config::apache on debian-11-x86_64 with ssl should include a https vhost
Failure/Error:
should contain_apache__vhost('foreman-ssl')
.with_ip(nil)
.with_servername(facts[:fqdn])
.with_serveraliases([])
.with_add_default_charset('UTF-8')
.with_docroot('/usr/share/foreman/public')
.with_priority('05')
.with_options(['SymLinksIfOwnerMatch'])
.with_port(443)
.with_ssl(true)
expected that the catalogue would contain Apache::Vhost[foreman-ssl] with proxy_pass set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}} but it is set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}, and parameter rewrites set to [{"comment"=>"Upgrade Websocket connections", "rewrite_cond"=>"%{HTTP:Upgrade} =websocket [NC]", "rewrite_rule"=>"/(.*) unix:///run/foreman.sock|ws://foreman/$1 [P,L]"}] but it is set to []
Diff:
@@ -1,4 +1,2 @@
-{"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}}
-
-{"comment"=>"Upgrade Websocket connections", "rewrite_cond"=>"%{HTTP:Upgrade} =websocket [NC]", "rewrite_rule"=>"/(.*) unix:///run/foreman.sock|ws://foreman/$1 [P,L]"}
+{"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}
|
Run tests:
spec/classes/foreman_config_apache_spec.rb#L44
foreman::config::apache on ubuntu-22.04-x86_64 configures the HTTP vhost
Failure/Error:
should contain_apache__vhost('foreman')
.with_ip(nil)
.with_servername(facts[:fqdn])
.with_serveraliases([])
.with_add_default_charset('UTF-8')
.with_docroot('/usr/share/foreman/public')
.with_priority('05')
.with_options(['SymLinksIfOwnerMatch'])
.with_port(80)
.with_custom_fragment(%r{^<LocationMatch "\^/\(assets\|webpack\)">$})
expected that the catalogue would contain Apache::Vhost[foreman] with proxy_pass set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}} but it is set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}, and parameter rewrites set to [{"comment"=>"Upgrade Websocket connections", "rewrite_cond"=>"%{HTTP:Upgrade} =websocket [NC]", "rewrite_rule"=>"/(.*) unix:///run/foreman.sock|ws://foreman/$1 [P,L]"}] but it is set to []
Diff:
@@ -1,4 +1,2 @@
-{"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}}
-
-{"comment"=>"Upgrade Websocket connections", "rewrite_cond"=>"%{HTTP:Upgrade} =websocket [NC]", "rewrite_rule"=>"/(.*) unix:///run/foreman.sock|ws://foreman/$1 [P,L]"}
+{"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}
|
Run tests:
spec/classes/foreman_config_apache_spec.rb#L156
foreman::config::apache on ubuntu-22.04-x86_64 with asset proxying enabled is expected to contain Apache::Vhost[foreman] with proxy_pass => {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}}
Failure/Error:
it { should contain_apache__vhost('foreman')
.with_proxy_pass(
"no_proxy_uris" => ['/pulp', '/pub', '/icons', '/images', '/server-status'],
"path" => '/',
"url" => 'unix:///run/foreman.sock|http://foreman/',
"params" => { "retry" => '0' },
)
}
expected that the catalogue would contain Apache::Vhost[foreman] with proxy_pass set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}} but it is set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}
|
Run tests:
spec/classes/foreman_config_apache_spec.rb#L184
foreman::config::apache on ubuntu-22.04-x86_64 with ssl should include a https vhost
Failure/Error:
should contain_apache__vhost('foreman-ssl')
.with_ip(nil)
.with_servername(facts[:fqdn])
.with_serveraliases([])
.with_add_default_charset('UTF-8')
.with_docroot('/usr/share/foreman/public')
.with_priority('05')
.with_options(['SymLinksIfOwnerMatch'])
.with_port(443)
.with_ssl(true)
expected that the catalogue would contain Apache::Vhost[foreman-ssl] with proxy_pass set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}} but it is set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}, and parameter rewrites set to [{"comment"=>"Upgrade Websocket connections", "rewrite_cond"=>"%{HTTP:Upgrade} =websocket [NC]", "rewrite_rule"=>"/(.*) unix:///run/foreman.sock|ws://foreman/$1 [P,L]"}] but it is set to []
Diff:
@@ -1,4 +1,2 @@
-{"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}}
-
-{"comment"=>"Upgrade Websocket connections", "rewrite_cond"=>"%{HTTP:Upgrade} =websocket [NC]", "rewrite_rule"=>"/(.*) unix:///run/foreman.sock|ws://foreman/$1 [P,L]"}
+{"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}
|
Run tests:
spec/classes/foreman_config_apache_spec.rb#L44
foreman::config::apache on debian-12-x86_64 configures the HTTP vhost
Failure/Error:
should contain_apache__vhost('foreman')
.with_ip(nil)
.with_servername(facts[:fqdn])
.with_serveraliases([])
.with_add_default_charset('UTF-8')
.with_docroot('/usr/share/foreman/public')
.with_priority('05')
.with_options(['SymLinksIfOwnerMatch'])
.with_port(80)
.with_custom_fragment(%r{^<LocationMatch "\^/\(assets\|webpack\)">$})
expected that the catalogue would contain Apache::Vhost[foreman] with proxy_pass set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}} but it is set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}, and parameter rewrites set to [{"comment"=>"Upgrade Websocket connections", "rewrite_cond"=>"%{HTTP:Upgrade} =websocket [NC]", "rewrite_rule"=>"/(.*) unix:///run/foreman.sock|ws://foreman/$1 [P,L]"}] but it is set to []
Diff:
@@ -1,4 +1,2 @@
-{"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}}
-
-{"comment"=>"Upgrade Websocket connections", "rewrite_cond"=>"%{HTTP:Upgrade} =websocket [NC]", "rewrite_rule"=>"/(.*) unix:///run/foreman.sock|ws://foreman/$1 [P,L]"}
+{"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}
|
Run tests:
spec/classes/foreman_config_apache_spec.rb#L156
foreman::config::apache on debian-12-x86_64 with asset proxying enabled is expected to contain Apache::Vhost[foreman] with proxy_pass => {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}}
Failure/Error:
it { should contain_apache__vhost('foreman')
.with_proxy_pass(
"no_proxy_uris" => ['/pulp', '/pub', '/icons', '/images', '/server-status'],
"path" => '/',
"url" => 'unix:///run/foreman.sock|http://foreman/',
"params" => { "retry" => '0' },
)
}
expected that the catalogue would contain Apache::Vhost[foreman] with proxy_pass set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}} but it is set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}
|
Run tests:
spec/classes/foreman_config_apache_spec.rb#L184
foreman::config::apache on debian-12-x86_64 with ssl should include a https vhost
Failure/Error:
should contain_apache__vhost('foreman-ssl')
.with_ip(nil)
.with_servername(facts[:fqdn])
.with_serveraliases([])
.with_add_default_charset('UTF-8')
.with_docroot('/usr/share/foreman/public')
.with_priority('05')
.with_options(['SymLinksIfOwnerMatch'])
.with_port(443)
.with_ssl(true)
expected that the catalogue would contain Apache::Vhost[foreman-ssl] with proxy_pass set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}} but it is set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}, and parameter rewrites set to [{"comment"=>"Upgrade Websocket connections", "rewrite_cond"=>"%{HTTP:Upgrade} =websocket [NC]", "rewrite_rule"=>"/(.*) unix:///run/foreman.sock|ws://foreman/$1 [P,L]"}] but it is set to []
Diff:
@@ -1,4 +1,2 @@
-{"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}}
-
-{"comment"=>"Upgrade Websocket connections", "rewrite_cond"=>"%{HTTP:Upgrade} =websocket [NC]", "rewrite_rule"=>"/(.*) unix:///run/foreman.sock|ws://foreman/$1 [P,L]"}
+{"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}
|
Run tests:
spec/classes/foreman_config_apache_spec.rb#L44
foreman::config::apache on centos-9-x86_64 configures the HTTP vhost
Failure/Error:
should contain_apache__vhost('foreman')
.with_ip(nil)
.with_servername(facts[:fqdn])
.with_serveraliases([])
.with_add_default_charset('UTF-8')
.with_docroot('/usr/share/foreman/public')
.with_priority('05')
.with_options(['SymLinksIfOwnerMatch'])
.with_port(80)
.with_custom_fragment(%r{^<LocationMatch "\^/\(assets\|webpack\)">$})
expected that the catalogue would contain Apache::Vhost[foreman] with proxy_pass set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}} but it is set to {"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}, and parameter rewrites set to [{"comment"=>"Upgrade Websocket connections", "rewrite_cond"=>"%{HTTP:Upgrade} =websocket [NC]", "rewrite_rule"=>"/(.*) unix:///run/foreman.sock|ws://foreman/$1 [P,L]"}] but it is set to []
Diff:
@@ -1,4 +1,2 @@
-{"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0"}}
-
-{"comment"=>"Upgrade Websocket connections", "rewrite_cond"=>"%{HTTP:Upgrade} =websocket [NC]", "rewrite_rule"=>"/(.*) unix:///run/foreman.sock|ws://foreman/$1 [P,L]"}
+{"no_proxy_uris"=>["/pulp", "/pub", "/icons", "/images", "/server-status", "/webpack", "/assets"], "path"=>"/", "url"=>"unix:///run/foreman.sock|http://foreman/", "params"=>{"retry"=>"0", "upgrade"=>"websocket"}}
|
Loading