Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

add t3c-tail sub-app#6960

Merged
rob05c merged 33 commits intoapache:masterfrom
jpappa200:t3c_metrics
Aug 23, 2022
Merged

add t3c-tail sub-app#6960
rob05c merged 33 commits intoapache:masterfrom
jpappa200:t3c_metrics

Conversation

@jpappa200
Copy link
Copy Markdown
Contributor

Adds the sub-app t3c-tail which can be used to tail a file, usually a log file. Reads json input from stdin. will mainly be used by t3c-apply to watch diags.log after trafficserver restart or reload. it can be useful to see what happened in diags.log without having to tail the file in a separate window. this will also be logged with the t3c log output.


Which Traffic Control components are affected by this PR?

  • Traffic Control Cache Config (t3c, formerly ORT)

What is the best way to verify this PR?

Build Traffic Control Cache Config and install. run t3c-apply in syncds or badass mode. verify that after reload/restart diags logs messages are displayed.

If this is a bugfix, which Traffic Control versions contained the bug?

PR submission checklist

@ocket8888 ocket8888 added new feature A new feature, capability or behavior cache-config Cache config generation labels Jul 14, 2022
Copy link
Copy Markdown
Member

@rob05c rob05c left a comment

Choose a reason for hiding this comment

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

Looks good! All my requests are pretty minor.

This is a great feature for t3c, thanks!

Comment thread CHANGELOG.md Outdated
Comment thread cache-config/t3c-apply/torequest/cmd.go Outdated
Comment thread cache-config/t3c-apply/torequest/torequest.go Outdated
Comment thread cache-config/t3c-tail/t3c-tail.go Outdated
Comment thread cache-config/t3cutil/t3cutil.go Outdated
Comment thread cache-config/t3c-tail/t3c-tail.go Outdated
@ocket8888 ocket8888 added the low impact affects only a small portion of a CDN, and cannot itself break one label Jul 22, 2022
Copy link
Copy Markdown
Member

@rob05c rob05c left a comment

Choose a reason for hiding this comment

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

LGTM. Code looks good, tested, t3c-apply runs and works as expected

@rob05c rob05c merged commit 1465626 into apache:master Aug 23, 2022
zrhoffman pushed a commit to zrhoffman/trafficcontrol that referenced this pull request Oct 2, 2022
* Added t3c-tail binary to t3c build

* added tail to command list

* Initial add

* moved tail config struct t3cutil

* Added t3c-tail binary to t3c build

* added tail to command list

* Initial add

* moved tail config struct t3cutil

* changes to matching for exit

* added filed for ending tail before timeout is reached

* added call to t3c-tail for reload and restart

* added doTail func to run t3c-tail

* updated README documentation

* updated timeout for ats reload

* added regex for end match

* Changed ending matches for restart and reload

* switched from sleep to timer and added logging

* added variables for matching

* strip datetime from diags log messages

* added changelog entry

* fixed formatting issues

* fixed one more formating issue

* fixed typo

* moved must compile outside of func, use flags instead of stdin

* changed and renamed timeout vars to MS, updated diags log to relative path

* removed struct that is no longer needed/used

* updated to use flags instead of stdin

* updated to reflect changes.

* fixed formatting errors
@jpappa200 jpappa200 deleted the t3c_metrics branch February 6, 2023 20:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cache-config Cache config generation low impact affects only a small portion of a CDN, and cannot itself break one new feature A new feature, capability or behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants