Skip to content
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

Remove expired cookie and bad signature cookie errors from error.log #7138

Merged
merged 1 commit into from Oct 19, 2022

Conversation

ericholguin
Copy link
Contributor

@ericholguin ericholguin commented Oct 13, 2022

Closes: #7134


Which Traffic Control components are affected by this PR?

  • Traffic Ops

What is the best way to verify this PR?

  • Build CiaB
  • Inspect the cdn-in-a-box_edge_1 contianer
    • create a copy of the current cookie:
cd /var/lib/trafficcontrol-cache-config
cp admin.cookie admin-old.cookie
  • You will have to wait an hour as that is when this old cookie will expire
  • Once it has expired you will need to first change the TO password that t3c uses so it doesn't simply overwrite the cookie:
    vi /etc/cron.d/traffic_ops_ort-cron
    Change the password to anything else, then go ahead and replace the new cookie with the old:
rm the `admin.cookie` file
cp admin-old.cookie admin.cookie

t3c will run again (runs every minute) If you look at the ort logs: tail -f /var/log/ort.log
You will see:

ERROR: t3c-request.go:68: 2022-10-13T22:47:01.876373173Z: writing data: getting server 'edge' update status: 
getting server update status: getting uncached: getting server update status from Traffic Ops '': 
error requesting Traffic Ops: path 'https://trafficops.infra.ciab.test:443/api/4.1/servers/edge/update_status' 
gave HTTP error 401 Unauthorized - error-level alerts: signature expired - unauthorized, please log in

If you also inspect the cdn-in-a-box_trafficops_1 and check the error.log (tail -f /var/log/traffic_ops/error.log) you will not see that error logged.

PR submission checklist

@shamrickus shamrickus self-assigned this Oct 19, 2022
@shamrickus shamrickus added Traffic Ops related to Traffic Ops improvement The functionality exists but it could be improved in some way. bug something isn't working as intended labels Oct 19, 2022
Copy link
Member

@shamrickus shamrickus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

  • Cleans up "errors" that aren't actually errors

@shamrickus shamrickus merged commit 7916ff6 into apache:master Oct 19, 2022
@ericholguin ericholguin deleted the cookie-err-cleanup branch November 4, 2022 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something isn't working as intended improvement The functionality exists but it could be improved in some way. Traffic Ops related to Traffic Ops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Remove cookie user errors from TO error.log
2 participants