Skip to content

Commit

Permalink
t3c remove perl dependency and references (#7829)
Browse files Browse the repository at this point in the history
* removed perl scripts no longer needed

* removed references to traffic_ops_ort and supermicro_udev_rules

* removed perl dependency

* updated CHANGELOG.md

* removed if clauses

(cherry picked from commit 51345aa)
  • Loading branch information
jpappa200 authored and rimashah25 committed Oct 23, 2023
1 parent 5864151 commit 23e9248
Show file tree
Hide file tree
Showing 9 changed files with 4 additions and 289 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).
- [#7271](https://github.com/apache/trafficcontrol/pull/7271) Removed `misc/jira_github_issue_import.py`, the project does not use JIRA.
- [#7271](https://github.com/apache/trafficcontrol/pull/7271) Removed `traffic_ops/install/bin/convert_profile/`, this script is outdated and is for use on an EOL ATS version.
- [#7271](https://github.com/apache/trafficcontrol/pull/7271) Removed `traffic_ops/install/bin/install_go.sh`, `traffic_ops/install/bin/todb_bootstrap.sh` and `traffic_ops/install/bin/install_goose.sh` are no longer in use.
- [#7829](https://github.com/apache/trafficcontrol/pull/7829) Removed `cache-config/supermicro_udev_mapper.pl` and `traffic_ops_ort.pl` and any references

## [7.0.0] - 2022-07-19
### Added
Expand Down
2 changes: 0 additions & 2 deletions cache-config/build/build_rpm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ initBuildArea() {
buildManpage 't3c-preprocess';
)

cp -p traffic_ops_ort.pl "$dest";
cp -p supermicro_udev_mapper.pl "$dest";
mkdir -p "${dest}/build";

echo "build_rpm.sh lsing for logrotate";
Expand Down
5 changes: 0 additions & 5 deletions cache-config/build/trafficcontrol-cache-config.spec
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,6 @@ mkdir -p "${RPM_BUILD_ROOT}"/var/log/trafficcontrol-cache-config
mkdir -p ${RPM_BUILD_ROOT}/"$mandir"/"$man1dir"
mkdir -p ${RPM_BUILD_ROOT}/usr/lib/systemd/system

cp -p ${RPM_SOURCE_DIR}/trafficcontrol-cache-config-%{version}/traffic_ops_ort.pl ${RPM_BUILD_ROOT}/"$installdir"
cp -p ${RPM_SOURCE_DIR}/trafficcontrol-cache-config-%{version}/supermicro_udev_mapper.pl ${RPM_BUILD_ROOT}/"$installdir"

src=src/github.com/apache/trafficcontrol/cache-config
cp -p ${RPM_SOURCE_DIR}/trafficcontrol-cache-config-%{version}/build/atstccfg.logrotate "${RPM_BUILD_ROOT}"/etc/logrotate.d/atstccfg
touch ${RPM_BUILD_ROOT}/var/log/trafficcontrol-cache-config/atstccfg.log
Expand Down Expand Up @@ -225,8 +222,6 @@ fi
%files
%license LICENSE
%attr(755, root, root)
/usr/bin/traffic_ops_ort.pl
/usr/bin/supermicro_udev_mapper.pl
/usr/bin/t3c
/usr/bin/t3c-apply
/usr/bin/t3c-check
Expand Down
81 changes: 0 additions & 81 deletions cache-config/supermicro_udev_mapper.pl

This file was deleted.

153 changes: 0 additions & 153 deletions cache-config/traffic_ops_ort.pl

This file was deleted.

14 changes: 2 additions & 12 deletions infrastructure/ansible/roles/ats/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,10 @@ ort_crontab:
syncds:
schedule: '0,20,40 * * * *'
user: root
job: >-
{%- if ort_version is not defined or ort_version == omit or ort_version >= '6.0.0-11351' -%}
t3c apply --run-mode=syncds --cache-host-name='{{ (ansible_nodename.split('.')) | first }}' -vv --traffic-ops-url='{{ ort_traffic_ops_url }}' --traffic-ops-user='{{ ort_traffic_ops_username }}' --traffic-ops-password='{{ ort_traffic_ops_password }}' &> /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 -%}
job: "t3c apply --run-mode=syncds --cache-host-name='{{ (ansible_nodename.split('.')) | first }}' -vv --traffic-ops-url='{{ ort_traffic_ops_url }}' --traffic-ops-user='{{ ort_traffic_ops_username }}' --traffic-ops-password='{{ ort_traffic_ops_password }}' &> /tmp/trafficcontrol-cache-config/syncds.log"
# Perform a check for user requested content invalidations every minute
reval:
schedule: '1-19,21-39,41-59 * * * *'
user: root
job: >-
{%- if ort_version is not defined or ort_version == omit or ort_version >= '6.0.0-11351' -%}
t3c apply --run-mode=revalidate --cache-host-name='{{ (ansible_nodename.split('.')) | first }}' -vv --traffic-ops-url='{{ ort_traffic_ops_url }}' --traffic-ops-user='{{ ort_traffic_ops_username }}' --traffic-ops-password='{{ ort_traffic_ops_password }}' &> /tmp/trafficcontrol-cache-config/reval.log
{%- else -%}
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
{%- endif -%}
job: "t3c apply --run-mode=revalidate --cache-host-name='{{ (ansible_nodename.split('.')) | first }}' -vv --traffic-ops-url='{{ ort_traffic_ops_url }}' --traffic-ops-user='{{ ort_traffic_ops_username }}' --traffic-ops-password='{{ ort_traffic_ops_password }}' &> /tmp/trafficcontrol-cache-config/reval.log"
ats_clear_data: false
24 changes: 1 addition & 23 deletions infrastructure/ansible/roles/ats/tasks/ats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,6 @@
retries: 5
delay: 5

- name: Deploy the udev device mapper script to a more reliable location
# with /opt on separate lvm part, udev on boot may fail
copy:
remote_src: true
src: >-
{%- if ort_version is not defined or ort_version == omit or ort_version >= '6.0.0-11351' -%}
/usr/bin/supermicro_udev_mapper.pl
{%- else -%}
/opt/ort/supermicro_udev_mapper.pl
{%- endif -%}
dest: /bin/supermicro_udev_mapper.pl
remote_src: true
owner: root
group: root
mode: 0755
ignore_errors: true

- name: Deploy ORT/t3c Crontab
template:
src: crontab.j2
Expand Down Expand Up @@ -66,12 +49,7 @@
- name: Run ORT Badass
shell:
executable: "{{ lookup('pipe','command -v bash') }}"
cmd: >-
{%- if ort_version is not defined or ort_version == omit or ort_version >= '6.0.0-11351' -%}
pkill -9 t3c || true; t3c apply --run-mode=badass --git=yes --cache-host-name='{{ (ansible_nodename.split('.')) | first }}' -vv --traffic-ops-url='{{ ort_traffic_ops_url }}' --traffic-ops-user='{{ ort_traffic_ops_username }}' --traffic-ops-password='{{ ort_traffic_ops_password }}' --wait-for-parents=false 2>&1 | tee /tmp/trafficcontrol-cache-config/badass_out; exit ${PIPESTATUS[0]}
{%- else -%}
pkill -9 _ort || true; traffic_ops_ort.pl -dispersion=0 --wait_for_parents=0 --login_dispersion=0 --retries=1 badass warn {{ ort_traffic_ops_url }} '{{ ort_traffic_ops_username }}:{{ ort_traffic_ops_password }}' 2>&1 | tee /tmp/badass_out; exit ${PIPESTATUS[0]}
{%- endif -%}
cmd: "pkill -9 t3c || true; t3c apply --run-mode=badass --git=yes --cache-host-name='{{ (ansible_nodename.split('.')) | first }}' -vv --traffic-ops-url='{{ ort_traffic_ops_url }}' --traffic-ops-user='{{ ort_traffic_ops_username }}' --traffic-ops-password='{{ ort_traffic_ops_password }}' --wait-for-parents=false 2>&1 | tee /tmp/trafficcontrol-cache-config/badass_out; exit ${PIPESTATUS[0]}"
no_log: True

- name: Reboot
Expand Down
6 changes: 0 additions & 6 deletions infrastructure/ansible/roles/dataset_loader/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -830,12 +830,6 @@ dl_ds_default_profile_layers:
value: INT 500
mid:
common:
- name: location
configFile: 40-ats.rules
value: "/etc/udev/rules.d/"
- name: udev_syncds
configFile: 40-ats.rules
value: 'KERNEL==\"sd*\", DRIVERS==\"mpt3sas\", PROGRAM=\"/bin/supermicro_udev_mapper.pl %k\", SYMLINK+=\"ats/%c\", OWNER=\"ats\"'
- name: weight
configFile: parent.config
value: '1.0'
Expand Down
7 changes: 0 additions & 7 deletions infrastructure/ansible/roles/grove/tasks/grove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@
path: /opt/ort
state: directory

- name: Create an empty ORT file
copy:
dest: "/opt/ort/traffic_ops_ort.pl"
content: |
#!/usr/bin/perl
# empty for Grove, prevents systems previously running ORT from overriding TO Update Flag
- name: Create an empty t3c file
copy:
dest: "/usr/bin/t3c"
Expand Down

0 comments on commit 23e9248

Please sign in to comment.