Alon Bar-Lev has uploaded a new change for review. Change subject: packaging: use simplified template when hadnling ovirt-engine-proxy.conf.in ......................................................................
packaging: use simplified template when hadnling ovirt-engine-proxy.conf.in Change-Id: I7031884c602e2bd5dfffb34b42e5925cf2f39afa Signed-off-by: Alon Bar-Lev <[email protected]> --- M packaging/fedora/setup/common_utils.py M packaging/fedora/setup/engine-setup.py M packaging/fedora/setup/ovirt-engine-proxy.conf.in 3 files changed, 9 insertions(+), 20 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/13/13313/1 diff --git a/packaging/fedora/setup/common_utils.py b/packaging/fedora/setup/common_utils.py index 888aa98..7b72be0 100755 --- a/packaging/fedora/setup/common_utils.py +++ b/packaging/fedora/setup/common_utils.py @@ -87,7 +87,7 @@ with open(template, 'r') as f: content = f.read() for k, v in subst.items(): - content = content.replace(k, v) + content = content.replace(str(k), str(v)) with open(name, 'w') as f: f.write(content) diff --git a/packaging/fedora/setup/engine-setup.py b/packaging/fedora/setup/engine-setup.py index 889807e..210e043 100755 --- a/packaging/fedora/setup/engine-setup.py +++ b/packaging/fedora/setup/engine-setup.py @@ -745,18 +745,13 @@ raise Exception(output_messages.ERR_EXP_UPD_HTTPD_SSL_CONFIG%(basedefs.FILE_HTTPD_SSL_CONFIG)) def _redirectUrl(): - try: - # Create the Apache configuration fragment from the template: - confTemplate = Template(file=basedefs.FILE_OVIRT_HTTPD_CONF_TEMPLATE) - confText = str(confTemplate) - - # Save the text produced by the template: - fd = open(basedefs.FILE_OVIRT_HTTPD_CONF, 'w') - fd.write(confText) - fd.close() - except: - logging.error(traceback.format_exc()) - raise Exception(output_messages.ERR_CREATE_OVIRT_HTTPD_CONF%(basedefs.FILE_OVIRT_HTTPD_CONF)) + utils.processTemplate( + basedefs.FILE_OVIRT_HTTPD_CONF_TEMPLATE, + basedefs.FILE_OVIRT_HTTPD_CONF, + { + '@JBOSS_AJP_PORT@': basedefs.JBOSS_AJP_PORT, + } + ) def _configureHttpdPort(): try: diff --git a/packaging/fedora/setup/ovirt-engine-proxy.conf.in b/packaging/fedora/setup/ovirt-engine-proxy.conf.in index e51e934..2a7d71d 100644 --- a/packaging/fedora/setup/ovirt-engine-proxy.conf.in +++ b/packaging/fedora/setup/ovirt-engine-proxy.conf.in @@ -1,6 +1,3 @@ -#import basedefs - -#raw # # Redirect all requests to the application server using the AJP # protocol. @@ -20,15 +17,12 @@ # finish before the web server aborts the request as the default timeout # (controlled by the Timeout directive in httpd.conf) is 60 seconds. # -#end raw -ProxyPass / ajp://localhost:${basedefs.JBOSS_AJP_PORT}/ retry=5 timeout=3600 +ProxyPass / ajp://localhost:@JBOSS_AJP_PORT@/ retry=5 timeout=3600 -#raw # # Remove the Expect headers from API requests (this is needed to fix a # problem with some API clients): # -#end raw <IfModule mod_headers.c> RequestHeader unset Expect early </IfModule> -- To view, visit http://gerrit.ovirt.org/13313 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I7031884c602e2bd5dfffb34b42e5925cf2f39afa 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
