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

logconfig: update file sink log validation config #132742

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

aa-joshi
Copy link
Contributor

@aa-joshi aa-joshi commented Oct 16, 2024

Previously, you can configure auditable & buffered sink at once in file sink log config. These configuration shouldn't co-exist. To address this, we have added a validation that both these configuration shouldn't co-exist.

Epic: CRDB-37534

Sample onfiguration & error message:
file-defaults: dir: cockroach-data/logs max-file-size: 10MiB max-group-size: 100MiB buffered-writes: false filter: INFO format: crdb-v2 redact: false redactable: true exit-on-error: true auditable: true buffering: max-staleness: 1s flush-trigger-size: 256KiB max-buffer-size: 50MiB

Screenshot 2024-10-16 at 8 30 03 PM

@aa-joshi aa-joshi requested review from a team as code owners October 16, 2024 11:28
@aa-joshi aa-joshi requested review from arjunmahishi and removed request for a team October 16, 2024 11:28
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@aa-joshi aa-joshi added backport-24.2.x Flags PRs that need to be backported to 24.2 branch-release-24.3 Used to mark GA and release blockers, technical advisories, and bugs for 24.3 and removed backport-24.2.x Flags PRs that need to be backported to 24.2 labels Oct 16, 2024
Copy link
Collaborator

@dhartunian dhartunian left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @aa-joshi and @arjunmahishi)


-- commits line 8 at r1:
Missing release note describing the change, this is required here because docs need to be updated and it's user-facing.


pkg/util/log/logconfig/validate.go line 377 at r1 (raw file):

		if *fc.Auditable {
			return errors.Newf(`File-based audit logging cannot coexist with buffered writes. ` +
				`Disable either the buffered-writes or auditable log configuration.`)

nit: should we put buffered-writes or auditable in quotes like above to signify that they're literal values in the yaml?

Previously, you can configure auditable & buffered sink at once in file sink
log config. These configuration shouldn't co-exist. To address this, we have
added a validation that both these configuration shouldn't co-exist.

Epic: CRDB-37534
Release note (ops change): Added log file sink validation for co-existing of
audit logging & buffering configurations. This validation makes sure that only
one of them should present.
Copy link
Contributor Author

@aa-joshi aa-joshi left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @arjunmahishi and @dhartunian)


-- commits line 8 at r1:

Previously, dhartunian (David Hartunian) wrote…

Missing release note describing the change, this is required here because docs need to be updated and it's user-facing.

Done.

Copy link
Collaborator

@dhartunian dhartunian left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @arjunmahishi)

@aa-joshi aa-joshi removed the branch-release-24.3 Used to mark GA and release blockers, technical advisories, and bugs for 24.3 label Oct 17, 2024
@aa-joshi
Copy link
Contributor Author

TFTR!

bors r+

@craig craig bot merged commit c3e5637 into cockroachdb:master Oct 17, 2024
23 checks passed
aa-joshi added a commit to aa-joshi/cockroach that referenced this pull request Oct 18, 2024
Previously we added a file sink log validation (cockroachdb#132742). This change updates
message so that message is clear to the user.

Epic: CRDB-37534
Release note (ops change): Updated the file sink log validation message. This
would give clear indication to user about the expected valid configuration.
aa-joshi added a commit to aa-joshi/cockroach that referenced this pull request Oct 18, 2024
Previously we added a file sink log validation (cockroachdb#132742). This change updates
message so that message is clear to the user.

Epic: CRDB-37534
Release note (ops change): Updated the file sink log validation message. This
would give clear indication to user about the expected valid configuration.
aa-joshi added a commit to aa-joshi/cockroach that referenced this pull request Oct 18, 2024
Previously we added a file sink log validation (cockroachdb#132742). This change updates
message so that message is clear to the user.

Epic: CRDB-37534
Release note (ops change): Updated the file sink log validation message. This
would give clear indication to user about the expected valid configuration.
craig bot pushed a commit that referenced this pull request Oct 18, 2024
132899: logconfig: update file sink log validation message r=aa-joshi a=aa-joshi

Previously we added a file sink log validation (#132742). This change updates message so that message is clear to the user.

Epic: CRDB-37534
Release note (ops change): Updated the file sink log validation message. This would give clear indication to user about the expected valid configuration.

Co-authored-by: Akshay Joshi <akshay@cockroachlabs.com>
jbowens added a commit to jbowens/cockroach that referenced this pull request Oct 21, 2024
Update the default logging configuration used for roachprod clusters to disable
auditable logs on logs going to file sinks. Some roachtests use the
buffered:true configuration to withstand disk stall events. This setting is
incompatible with auditable logs on file sinks and recently introduced
validation (cockroachdb#132742) prohibits the settings from being used together.

Release note: none
Informs cockroachdb#129922.
Informs cockroachdb#132988.
Epic: none
craig bot pushed a commit that referenced this pull request Oct 21, 2024
132916: kvserver: clear rac2 token metrics prior to integration testing r=sumeerbhola a=kvoli

`TestFlowControl.*V2` tests assert on exact counters. This can be problematic if benign deltas occur while setting up the test, such a send queue forming when adding a new learner, but being quickly resolved.

Clear the token metrics prior to commencing these tests, in order to prevent flakes that result from such deltas in setup.

Fixes: #132642
Release note: None

133089: roachprod: update default CockroachDB logging configuration r=dhartunian a=jbowens

Update the default logging configuration used for roachprod clusters to disable auditable logs on logs going to file sinks. Some roachtests use the buffered:true configuration to withstand disk stall events. This setting is incompatible with auditable logs on file sinks and recently introduced validation (#132742) prohibits the settings from being used together.

Release note: none
Informs #129922.
Informs #132988.
Epic: none

Co-authored-by: Austen McClernon <austen@cockroachlabs.com>
Co-authored-by: Jackson Owens <jackson@cockroachlabs.com>
blathers-crl bot pushed a commit that referenced this pull request Oct 21, 2024
Update the default logging configuration used for roachprod clusters to disable
auditable logs on logs going to file sinks. Some roachtests use the
buffered:true configuration to withstand disk stall events. This setting is
incompatible with auditable logs on file sinks and recently introduced
validation (#132742) prohibits the settings from being used together.

Release note: none
Informs #129922.
Informs #132988.
Epic: none
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.

3 participants