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

drt: add date to roachtest_ops.log entries #125350

Merged
merged 1 commit into from
Jun 10, 2024

Conversation

vidit-bhat
Copy link
Contributor

@vidit-bhat vidit-bhat commented Jun 7, 2024

Previously, roachtest_ops.log entries show the current timestamp in hh:mm:ss without the timezone. This makes correlating logs quite tricky. This patch add date and timezone to the logs.

Fixes: #125304
Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@vidit-bhat vidit-bhat marked this pull request as ready for review June 8, 2024 11:15
@vidit-bhat vidit-bhat requested a review from a team as a code owner June 8, 2024 11:15
@vidit-bhat vidit-bhat requested review from herkolategan, srosenberg, itsbilal and renatolabs and removed request for a team June 8, 2024 11:15
@vidit-bhat vidit-bhat force-pushed the drt-add-date-roachtest-ops branch from eb90d2e to 59a77ef Compare June 8, 2024 14:45
@renatolabs
Copy link
Contributor

How do the log entries look like? I wonder if we should just change roachprod's defaults to include Ldate, as that would likely be useful for roachtest as well.

@vidit-bhat
Copy link
Contributor Author

vidit-bhat commented Jun 10, 2024

How do the log entries look like? I wonder if we should just change roachprod's defaults to include Ldate, as that would likely be useful for roachtest as well.

How do the log entries look like? I wonder if we should just change roachprod's defaults to include Ldate, as that would likely be useful for roachtest as well.

Something like

2024/06/10 15:48:58 run.go:554: more than one operation found for filter node-kill, randomly selected node-kill/sigterm/drain=false to run
2024/06/10 15:48:58 main.go:198: operation status: checking if operation node-kill/sigterm/drain=false dependencies are met
2024/06/10 15:48:58 main.go:198: operation status: skipping dependency check
2024/06/10 15:48:58 main.go:198: operation status: running operation node-kill/sigterm/drain=false with run id 1883723429829256626
2024/06/10 15:48:58 node_kill.go:51: operation status: killing node 3  with signal 15
2024/06/10 15:48:58 cluster.go:2420: running cmd `pkill -15 -f cockroach\ start` on nodes [:3]; details in run_154858.582585000_n3_pkill-15-f-cockroach.log
run_154858.582585000_n3_pkill-15-f-cockroach: 15:48:58 cluster.go:2421: > pkill -15 -f cockroach\ start
run_154858.582585000_n3_pkill-15-f-cockroach: 15:48:58 cluster.go:2439: > result: <ok>
2024/06/10 15:48:58 node_kill.go:51: operation status: sent signal 15 to node 3 , waiting for process to exit
2024/06/10 15:48:58 cluster.go:2420: running cmd `pgrep -f cockroach\ start` on nodes [:3]; details in run_154858.617996000_n3_pgrep-f-cockroach-st.log

We don't see the timestamp but it's UTC by default I think. I thought of adding LDate in defaults but then wasn't sure if we'd want to have the date everywhere.

@renatolabs
Copy link
Contributor

@cockroachdb/test-eng anyone opposed to adding Ldate to roachprod's default log flags? This issue has definitely come up before when investigating failures in the weekly test suite. I personally think it's a good default, but let me know if I'm missing something.

@vidit-bhat
Copy link
Contributor Author

I'll make the changes

Previously, roachtest_ops.log entries show the current timestamp in hh:mm:ss
without the timezone. This makes correlating logs quite tricky.
This patch add date and timezone to the log

Fixes: cockroachdb#125304

Release note: None
@vidit-bhat vidit-bhat force-pushed the drt-add-date-roachtest-ops branch from 59a77ef to 8026da8 Compare June 10, 2024 21:09
@vidit-bhat
Copy link
Contributor Author

bors r+

@craig craig bot merged commit 36905d3 into cockroachdb:master Jun 10, 2024
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

drt: add date to roachtest_ops.log entries
4 participants