You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by zr...@apache.org on 2021/11/05 00:17:01 UTC

[trafficcontrol] 09/22: Fix TR ansible downgrade ability from 6 -> 5 (#6300)

This is an automated email from the ASF dual-hosted git repository.

zrhoffman pushed a commit to branch 6.0.x
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit ac6d2105cfb511fb7cccd22551640b102e1c3d32
Author: Rawlin Peters <ra...@apache.org>
AuthorDate: Tue Oct 19 14:58:47 2021 -0600

    Fix TR ansible downgrade ability from 6 -> 5 (#6300)
    
    For major versions earlier than 6, the package structure was different.
---
 .../ansible/roles/traffic-router/templates/conf/server.xml.j2         | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/infrastructure/ansible/roles/traffic-router/templates/conf/server.xml.j2 b/infrastructure/ansible/roles/traffic-router/templates/conf/server.xml.j2
index 2d7864b..73468f7 100644
--- a/infrastructure/ansible/roles/traffic-router/templates/conf/server.xml.j2
+++ b/infrastructure/ansible/roles/traffic-router/templates/conf/server.xml.j2
@@ -29,7 +29,11 @@
         <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener" />
         <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener" />
 
+{% if tr_version is defined and tr_version != omit and tr_version and tr_version.split(".")[0] | int < 6 %}
+        <Listener className="com.comcast.cdn.traffic_control.traffic_router.tomcat.TomcatLifecycleListener" />
+{% else %}
         <Listener className="org.apache.traffic_control.traffic_router.tomcat.TomcatLifecycleListener" />
+{% endif %}
         <!-- A "Service" is a collection of one or more "Connectors" that share
                 a single "Container" Note: A "Service" is not itself a "Container", so you
                 may not define subcomponents such as "Valves" at this level. Documentation