You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/05/12 04:21:42 UTC

[GitHub] [trafficcontrol] rob05c opened a new pull request #5839: Fix ort references to t3c

rob05c opened a new pull request #5839:
URL: https://github.com/apache/trafficcontrol/pull/5839


   Fixes traffic_ops_ort references to t3c.
   
   No docs, no changelog, bug is not in a release.
   Fixes tests.
   
   - [x] This PR fixes #5837 OR is not related to any Issue
   
   ## Which Traffic Control components are affected by this PR?
   - Traffic Ops ORT
   
   ## What is the best way to verify this PR?
   Run Ansible infrastructure. Run tests.
   
   ## If this is a bug fix, what versions of Traffic Control are affected?
   - master
   
   ## The following criteria are ALL met by this PR
   
   - [x] This PR includes tests OR I have explained why tests are unnecessary
   - [x] This PR includes documentation OR I have explained why documentation is unnecessary
   - [x] This PR includes an update to CHANGELOG.md OR such an update is not necessary
   - [x] This PR includes any and all required license headers
   - [x] This PR **DOES NOT FIX A SERIOUS SECURITY VULNERABILITY** (see [the Apache Software Foundation's security guidelines](https://www.apache.org/security/) for details)
   
   
   ## Additional Information
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] jhg03a commented on pull request #5839: Fix ort references to t3c

Posted by GitBox <gi...@apache.org>.
jhg03a commented on pull request #5839:
URL: https://github.com/apache/trafficcontrol/pull/5839#issuecomment-840050766


   I tested the quoting and version bits with the task:
   ``` yaml
   - debug:
       msg: >-
         {% if ort_version is not defined or ort_version == omit or ort_version >= '6.0.0.11351' -%}
           t3c foo
         {%- else -%}
           traffic_ops_ort.pl bar
         {%- endif %}
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] ocket8888 merged pull request #5839: Fix ort references to t3c

Posted by GitBox <gi...@apache.org>.
ocket8888 merged pull request #5839:
URL: https://github.com/apache/trafficcontrol/pull/5839


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] rob05c commented on a change in pull request #5839: Fix ort references to t3c

Posted by GitBox <gi...@apache.org>.
rob05c commented on a change in pull request #5839:
URL: https://github.com/apache/trafficcontrol/pull/5839#discussion_r631420068



##########
File path: infrastructure/ansible/roles/ats/defaults/main.yml
##########
@@ -14,7 +14,16 @@
 #
 
 install_ats: False
-ort_pkg_name: "{% if ort_version is defined and ort_version != omit %}{{ 'traffic_ops_ort-'+ort_version }}{% else %}traffic_ops_ort{% endif %}"
+ort_pkg_name: >

Review comment:
       Ok, fixed

##########
File path: infrastructure/ansible/roles/ats/defaults/main.yml
##########
@@ -23,15 +32,25 @@ ort_traffic_ops_url:
 ort_traffic_ops_username:
 ort_traffic_ops_password:
 
-# ORT cronjobs to deploy
+# t3c cronjobs to deploy
 ort_crontab:
   # Perform configuration polling that doesn't require a restart on a 20 minute +- dispersion interval
   syncds:
     schedule: '0,20,40 * * * *'
     user: root
-    job:  "traffic_ops_ort.pl syncds warn {{ ort_traffic_ops_url }} '{{ ort_traffic_ops_username }}:{{ ort_traffic_ops_password }}' --login_dispersion=35 --dispersion=420 &>/tmp/ort/syncds.log"
+    job: >

Review comment:
       Fixed

##########
File path: infrastructure/ansible/roles/ats/defaults/main.yml
##########
@@ -23,15 +32,25 @@ ort_traffic_ops_url:
 ort_traffic_ops_username:
 ort_traffic_ops_password:
 
-# ORT cronjobs to deploy
+# t3c cronjobs to deploy
 ort_crontab:
   # Perform configuration polling that doesn't require a restart on a 20 minute +- dispersion interval
   syncds:
     schedule: '0,20,40 * * * *'
     user: root
-    job:  "traffic_ops_ort.pl syncds warn {{ ort_traffic_ops_url }} '{{ ort_traffic_ops_username }}:{{ ort_traffic_ops_password }}' --login_dispersion=35 --dispersion=420 &>/tmp/ort/syncds.log"
+    job: >
+      {% if ort_version is not defined or ort_version == omit or ort_version >= 6.0.0.11351 %}
+        t3c apply --run-mode=syncds --log-location-warning=stderr --log-location-error=stderr --traffic-ops-url='{{ ort_traffic_ops_url }}' --traffic-ops-user='{{ ort_traffic_ops_username }}' --traffic-ops-password='{{ ort_traffic_ops_password }}' --login-dispersion=35 --dispersion=420 &> /tmp/trafficcontrol-cache-config/syncds.log
+      {% else %}
+        traffic_ops_ort.pl syncds warn {{ ort_traffic_ops_url }} '{{ ort_traffic_ops_username }}:{{ ort_traffic_ops_password }}' --login_dispersion=35 --dispersion=420 &>/tmp/ort/syncds.log
+      {% endif %}
   # Perform a check for user requested content invalidations every minute
   reval:
     schedule: '1-19,21-39,41-59 * * * *'
     user: root
-    job:  "traffic_ops_ort.pl revalidate warn {{ ort_traffic_ops_url }} '{{ ort_traffic_ops_username }}:{{ ort_traffic_ops_password }}' --login_dispersion=35 &>/tmp/ort/reval.log"
+    job: >

Review comment:
       Fixed

##########
File path: infrastructure/ansible/roles/ats/tasks/ats.yml
##########
@@ -25,7 +25,12 @@
 - name: Deploy the udev device mapper script to a more reliable location
   # with /opt on separate lvm part, udev on boot may fail
   copy:
-    src: /opt/ort/supermicro_udev_mapper.pl
+    src: >

Review comment:
       Fixed




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] rob05c commented on a change in pull request #5839: Fix ort references to t3c

Posted by GitBox <gi...@apache.org>.
rob05c commented on a change in pull request #5839:
URL: https://github.com/apache/trafficcontrol/pull/5839#discussion_r631404285



##########
File path: infrastructure/ansible/roles/ats/defaults/main.yml
##########
@@ -14,7 +14,16 @@
 #
 
 install_ats: False
-ort_pkg_name: "{% if ort_version is defined and ort_version != omit %}{{ 'traffic_ops_ort-'+ort_version }}{% else %}traffic_ops_ort{% endif %}"
+ort_pkg_name: >
+  {% if ort_version is defined and ort_version != omit %}
+    {% if ort_version >= 6.0.0.11351 %}

Review comment:
       Done

##########
File path: infrastructure/ansible/roles/ats/defaults/main.yml
##########
@@ -14,7 +14,16 @@
 #
 
 install_ats: False
-ort_pkg_name: "{% if ort_version is defined and ort_version != omit %}{{ 'traffic_ops_ort-'+ort_version }}{% else %}traffic_ops_ort{% endif %}"
+ort_pkg_name: >
+  {% if ort_version is defined and ort_version != omit %}
+    {% if ort_version >= 6.0.0.11351 %}
+      {{ 'trafficcontrol-cache-config-'+ort_version }}
+    {% else %}
+      {{ 'trafficcontrol-cache-config-'+ort_version }}

Review comment:
       Done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] jhg03a commented on a change in pull request #5839: Fix ort references to t3c

Posted by GitBox <gi...@apache.org>.
jhg03a commented on a change in pull request #5839:
URL: https://github.com/apache/trafficcontrol/pull/5839#discussion_r631339339



##########
File path: infrastructure/ansible/roles/ats/defaults/main.yml
##########
@@ -14,7 +14,16 @@
 #
 
 install_ats: False
-ort_pkg_name: "{% if ort_version is defined and ort_version != omit %}{{ 'traffic_ops_ort-'+ort_version }}{% else %}traffic_ops_ort{% endif %}"
+ort_pkg_name: >
+  {% if ort_version is defined and ort_version != omit %}
+    {% if ort_version >= 6.0.0.11351 %}
+      {{ 'trafficcontrol-cache-config-'+ort_version }}
+    {% else %}
+      {{ 'trafficcontrol-cache-config-'+ort_version }}

Review comment:
       This should be the old ORT name.

##########
File path: infrastructure/ansible/roles/ats/defaults/main.yml
##########
@@ -23,15 +32,25 @@ ort_traffic_ops_url:
 ort_traffic_ops_username:
 ort_traffic_ops_password:
 
-# ORT cronjobs to deploy
+# t3c cronjobs to deploy
 ort_crontab:
   # Perform configuration polling that doesn't require a restart on a 20 minute +- dispersion interval
   syncds:
     schedule: '0,20,40 * * * *'
     user: root
-    job:  "traffic_ops_ort.pl syncds warn {{ ort_traffic_ops_url }} '{{ ort_traffic_ops_username }}:{{ ort_traffic_ops_password }}' --login_dispersion=35 --dispersion=420 &>/tmp/ort/syncds.log"
+    job: >
+      {% if ort_version is not defined or ort_version == omit or ort_version >= 6.0.0.11351 %}
+        t3c apply --run-mode=syncds --log-location-warning=stderr --log-location-error=stderr --traffic-ops-url='{{ ort_traffic_ops_url }}' --traffic-ops-user='{{ ort_traffic_ops_username }}' --traffic-ops-password='{{ ort_traffic_ops_password }}' --login-dispersion=35 --dispersion=420 &> /tmp/trafficcontrol-cache-config/syncds.log
+      {% else %}
+        traffic_ops_ort.pl syncds warn {{ ort_traffic_ops_url }} '{{ ort_traffic_ops_username }}:{{ ort_traffic_ops_password }}' --login_dispersion=35 --dispersion=420 &>/tmp/ort/syncds.log
+      {% endif %}
   # Perform a check for user requested content invalidations every minute
   reval:
     schedule: '1-19,21-39,41-59 * * * *'
     user: root
-    job:  "traffic_ops_ort.pl revalidate warn {{ ort_traffic_ops_url }} '{{ ort_traffic_ops_username }}:{{ ort_traffic_ops_password }}' --login_dispersion=35 &>/tmp/ort/reval.log"
+    job: >

Review comment:
       See above whitespace and version quoting

##########
File path: infrastructure/ansible/roles/ats/defaults/main.yml
##########
@@ -14,7 +14,16 @@
 #
 
 install_ats: False
-ort_pkg_name: "{% if ort_version is defined and ort_version != omit %}{{ 'traffic_ops_ort-'+ort_version }}{% else %}traffic_ops_ort{% endif %}"
+ort_pkg_name: >

Review comment:
       Since you don't want extra whitespace or newlines, you should use `>-` and the jinja interpolation tokens need `{%-` and `-%}` appropriately.

##########
File path: infrastructure/ansible/roles/ats/tasks/ats.yml
##########
@@ -25,7 +25,12 @@
 - name: Deploy the udev device mapper script to a more reliable location
   # with /opt on separate lvm part, udev on boot may fail
   copy:
-    src: /opt/ort/supermicro_udev_mapper.pl
+    src: >

Review comment:
       See above whitespace and version quoting

##########
File path: infrastructure/ansible/roles/ats/defaults/main.yml
##########
@@ -14,7 +14,16 @@
 #
 
 install_ats: False
-ort_pkg_name: "{% if ort_version is defined and ort_version != omit %}{{ 'traffic_ops_ort-'+ort_version }}{% else %}traffic_ops_ort{% endif %}"
+ort_pkg_name: >
+  {% if ort_version is defined and ort_version != omit %}
+    {% if ort_version >= 6.0.0.11351 %}

Review comment:
       The version needs single quotes everywhere

##########
File path: infrastructure/ansible/roles/ats/defaults/main.yml
##########
@@ -23,15 +32,25 @@ ort_traffic_ops_url:
 ort_traffic_ops_username:
 ort_traffic_ops_password:
 
-# ORT cronjobs to deploy
+# t3c cronjobs to deploy
 ort_crontab:
   # Perform configuration polling that doesn't require a restart on a 20 minute +- dispersion interval
   syncds:
     schedule: '0,20,40 * * * *'
     user: root
-    job:  "traffic_ops_ort.pl syncds warn {{ ort_traffic_ops_url }} '{{ ort_traffic_ops_username }}:{{ ort_traffic_ops_password }}' --login_dispersion=35 --dispersion=420 &>/tmp/ort/syncds.log"
+    job: >

Review comment:
       See above whitespace and version quoting




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] rob05c commented on a change in pull request #5839: Fix ort references to t3c

Posted by GitBox <gi...@apache.org>.
rob05c commented on a change in pull request #5839:
URL: https://github.com/apache/trafficcontrol/pull/5839#discussion_r631404611



##########
File path: infrastructure/ansible/roles/ats/defaults/main.yml
##########
@@ -14,7 +14,16 @@
 #
 
 install_ats: False
-ort_pkg_name: "{% if ort_version is defined and ort_version != omit %}{{ 'traffic_ops_ort-'+ort_version }}{% else %}traffic_ops_ort{% endif %}"
+ort_pkg_name: >

Review comment:
       I thought `: >` would collapse newlines and extra spaces ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [trafficcontrol] rob05c commented on a change in pull request #5839: Fix ort references to t3c

Posted by GitBox <gi...@apache.org>.
rob05c commented on a change in pull request #5839:
URL: https://github.com/apache/trafficcontrol/pull/5839#discussion_r631404611



##########
File path: infrastructure/ansible/roles/ats/defaults/main.yml
##########
@@ -14,7 +14,16 @@
 #
 
 install_ats: False
-ort_pkg_name: "{% if ort_version is defined and ort_version != omit %}{{ 'traffic_ops_ort-'+ort_version }}{% else %}traffic_ops_ort{% endif %}"
+ort_pkg_name: >

Review comment:
       I thought `: >` would collapse newlines and extra spaces ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org