-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symlink from /opt/<component>/var/log
to /var/log/<component>
.
#7999
Conversation
These symlinks are deprecated with the intent of removing them in ATC 9.0.0.
Symlink support is added in mojohaus/rpm-maven-plugin#42.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Few questions to be addressed
cp -R * ${RPM_BUILD_ROOT}/%{tomcat_home}/ | ||
ln -s /var/log/tomcat "${RPM_BUILD_ROOT}"%{tomcat_home}/logs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would a "ln -sf" be a more resilient option here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If adding -f
ever prevents an error on this line, it means that there was already some file that existed at ${RPM_BUILD_ROOT}/opt/traffic_stats/var/log
. We'd rather know that such a file exists than cover up the error, right?
@@ -49,6 +49,8 @@ mkdir -p "${RPM_BUILD_ROOT}"/opt/traffic_monitor/backup | |||
mkdir -p "${RPM_BUILD_ROOT}"/opt/traffic_monitor/static | |||
mkdir -p "${RPM_BUILD_ROOT}"/opt/traffic_monitor/var/run | |||
mkdir -p "${RPM_BUILD_ROOT}"/var/log/traffic_monitor | |||
# TODO: The /opt/traffic_monitor/var/log symlink is deprecated and should be removed for ATC 9.0.0. | |||
ln -s /var/log/traffic_monitor "${RPM_BUILD_ROOT}"/opt/traffic_monitor/var/log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would a "ln -sf" be a more resilient option here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If adding -f
ever prevents an error on this line, it means that there was already some file that existed at ${RPM_BUILD_ROOT}/opt/traffic_monitor/var/log
. We'd rather know that such a file exists than cover up the error, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR creates symlinks from
/opt/<component>/var/log
to/var/log/<component>
for the log directories that were moved in #7979. This is useful if you have any code or configuration still referencing/opt/<component>/var/log
, because it buys some time to change those references to/var/log/<component>
, rather than requiring that everything is changed all at once, whenever you deploy #7979.Because this is intended as a temporary measure, these symlinks are deprecated with the intent of removing them in ATC 9.0.0, assuming there is a release before then that does include the symlinks.
Which Traffic Control components are affected by this PR?
What is the best way to verify this PR?
Build and install the RPMs, verify the symlinks exist.
cd infrastructure/cdn-in-a-box make traffic_monitor/traffic_monitor.rpm traffic_router/traffic_router.rpm traffic_router/tomcat.rpm traffic_stats/traffic_stats.rpm docker-compose build trafficmonitor trafficrouter trafficstats docker-compose run --rm --no-deps --entrypoint= trafficmonitor ls -l /opt/traffic_monitor/var docker-compose run --rm --no-deps trafficrouter ls -l /opt/traffic_router/var docker-compose run --rm --no-deps --entrypoint= trafficstats ls -l /opt/traffic_stats/var
PR submission checklist