Alon Bar-Lev has uploaded a new change for review. Change subject: packaging: api: redirect /api to /ovirt-engine/api by duplicating war installation ......................................................................
packaging: api: redirect /api to /ovirt-engine/api by duplicating war installation Using forward servlet is not a complete solution as there is some limitation of sharing context. So java based solution is not easily possible. Jboss rewrite rules cannot be used as it ignores the matrix ';' suffix. Using apache has side effect is a redirect between /api and /api/ as apache must normalize the directory due to internal limitation. We end up installing war twice one per context. Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1031597 Change-Id: I021c98bb6b5dcd0812db2b130967ebea27fad4e9 Signed-off-by: Alon Bar-Lev <[email protected]> --- M Makefile M backend/manager/modules/restapi/webapp/src/main/webapp/WEB-INF/web.xml M ear/pom.xml M ovirt-engine.spec.in M packaging/conf/ovirt-engine-proxy.conf.v2.in M packaging/setup/plugins/ovirt-engine-setup/apache/ovirt_engine.py 6 files changed, 8 insertions(+), 24 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/55/21955/1 diff --git a/Makefile b/Makefile index b4b31f8..5a5439d 100644 --- a/Makefile +++ b/Makefile @@ -398,8 +398,6 @@ ln -s "$(DATA_DIR)/branding/ovirt.brand" "$(DESTDIR)$(PKG_SYSCONF_DIR)/branding/00-ovirt.brand" ln -sf "$(DATA_DIR)/conf/osinfo-defaults.properties" "$(DESTDIR)$(PKG_SYSCONF_DIR)/osinfo.conf.d/00-defaults.properties" - install -d -m 755 "$(DESTDIR)$(DATA_DIR)/empty" - # legacy-begin ln -sf "$(DATA_DIR)/bin/engine-upgrade.sh" "$(DESTDIR)$(BIN_DIR)/engine-upgrade" ln -sf "$(DATA_DIR)/bin/engine-check-update.sh" "$(DESTDIR)$(BIN_DIR)/engine-check-update" diff --git a/backend/manager/modules/restapi/webapp/src/main/webapp/WEB-INF/web.xml b/backend/manager/modules/restapi/webapp/src/main/webapp/WEB-INF/web.xml index 76af9ab..eade16d 100644 --- a/backend/manager/modules/restapi/webapp/src/main/webapp/WEB-INF/web.xml +++ b/backend/manager/modules/restapi/webapp/src/main/webapp/WEB-INF/web.xml @@ -25,8 +25,5 @@ <session-config> <session-timeout>180</session-timeout> - <cookie-config> - <path>/</path> - </cookie-config> </session-config> </web-app> diff --git a/ear/pom.xml b/ear/pom.xml index eab728b..7f50ef5 100644 --- a/ear/pom.xml +++ b/ear/pom.xml @@ -204,6 +204,13 @@ </webModule> <webModule> + <groupId>org.ovirt.engine.api</groupId> + <artifactId>restapi-webapp</artifactId> + <bundleFileName>legacy_restapi.war</bundleFileName> + <contextRoot>/api</contextRoot> + </webModule> + + <webModule> <groupId>org.ovirt.engine.ui</groupId> <artifactId>userportal</artifactId> <bundleFileName>userportal.war</bundleFileName> diff --git a/ovirt-engine.spec.in b/ovirt-engine.spec.in index f63b2d7..67336e2 100644 --- a/ovirt-engine.spec.in +++ b/ovirt-engine.spec.in @@ -709,7 +709,6 @@ %dir %{engine_data}/bin %dir %{engine_data}/branding %dir %{engine_data}/conf -%dir %{engine_data}/empty %dir %{engine_data}/engine.ear %dir %{engine_data}/services %dir %{engine_etc} diff --git a/packaging/conf/ovirt-engine-proxy.conf.v2.in b/packaging/conf/ovirt-engine-proxy.conf.v2.in index 046311b..3e459df 100644 --- a/packaging/conf/ovirt-engine-proxy.conf.v2.in +++ b/packaging/conf/ovirt-engine-proxy.conf.v2.in @@ -22,21 +22,7 @@ RequestHeader unset Expect early </IfModule> - # Legacy support of /api/ - <IfModule rewrite_module> - Alias /api @OVIRT_ENGINE_DATADIR@/empty - <Directory @OVIRT_ENGINE_DATADIR@/empty> - Options Indexes FollowSymLinks - Order Allow,Deny - Allow from all - Satisfy Any - AllowOverride all - RewriteEngine on - RewriteRule ^(.*)$ /ovirt-engine/api/$1 [L] - </Directory> - </IfModule> - - <LocationMatch ^/(ovirt-engine($|/)|RHEVManagerWeb/|OvirtEngineWeb/|ca.crt$|engine.ssh.key.txt$|rhevm.ssh.key.txt$)> + <LocationMatch ^/(ovirt-engine($|/)|(api($|/)|RHEVManagerWeb/|OvirtEngineWeb/|ca.crt$|engine.ssh.key.txt$|rhevm.ssh.key.txt$)> ProxyPassMatch ajp://127.0.0.1:@JBOSS_AJP_PORT@ timeout=3600 <IfModule deflate_module> diff --git a/packaging/setup/plugins/ovirt-engine-setup/apache/ovirt_engine.py b/packaging/setup/plugins/ovirt-engine-setup/apache/ovirt_engine.py index a624dfa..2634283 100644 --- a/packaging/setup/plugins/ovirt-engine-setup/apache/ovirt_engine.py +++ b/packaging/setup/plugins/ovirt-engine-setup/apache/ovirt_engine.py @@ -68,9 +68,6 @@ HTTPD_CONF_OVIRT_ENGINE_TEMPLATE ), subst={ - '@OVIRT_ENGINE_DATADIR@': ( - osetupcons.FileLocations.OVIRT_ENGINE_DATADIR - ), '@JBOSS_AJP_PORT@': self.environment[ osetupcons.ConfigEnv.JBOSS_AJP_PORT ], -- To view, visit http://gerrit.ovirt.org/21955 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I021c98bb6b5dcd0812db2b130967ebea27fad4e9 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
