apache / trafficcontrol

Apache Traffic Control is an Open Source implementation of a Content Delivery Network
https://trafficcontrol.apache.org/
Apache License 2.0
1.06k stars 344 forks source link

t3c-apply doesn't respect -R/--trafficserver-home for t3c-check-refs calls #6198

Open ocket8888 opened 3 years ago

ocket8888 commented 3 years ago

This Bug Report affects these Traffic Control components:

Current behavior:

Regardless of any passed -R/--trafficserver-home value, the call t3c-apply makes to t3c-check-refs doesn't pass any flags that would cause it to look anywhere except /opt/trafficserver/libexec/trafficserver for plugins, or configuration files anywhere except /opt/trafficserver/etc/trafficserver/

Expected behavior:

-R/--trafficserver-home should be fully respected and passed appropriately to all externally called commands.

Steps to reproduce:

Install ATS anywhere except exactly /opt/, then run t3c apply. Notice that t3c-check-refs complains that it can't open /opt/trafficserver/libexec/trafficserver.

ocket8888 commented 3 years ago

Slack user amc suggests using traffic_layout to determine the ATS file hierarchy, which is related to this and could potentially be implemented at the same time.

zrhoffman commented 2 years ago

6198 is labeled both low impact and medium impact.

ocket8888 commented 2 years ago

I'm not sure this is still true, may need re-investigating

rob05c commented 2 years ago

I haven't tested, but looking at the code, it appears to still be true.

t3c-check-refs takes a flag --trafficserver-config-dir, but t3c-apply doesn't appear to ever pass that flag.