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

storage: fix incorrect mount association #137024

Merged

Conversation

RaduBerinde
Copy link
Member

We use filepath.Rel to associate a data directory with a mountpoint,
but the code incorrectly tolerates a result which starts with ../.
This commit adds a check for this case.

Fixes: #137021

Release note (bug fix): Fixed bug that causes an incorrect filesystem
to be logged as part of the store information.

@RaduBerinde RaduBerinde added backport-24.1.x Flags PRs that need to be backported to 24.1. backport-24.2.x Flags PRs that need to be backported to 24.2 backport-24.3.x Flags PRs that need to be backported to 24.3 labels Dec 9, 2024
@RaduBerinde RaduBerinde requested a review from a team as a code owner December 9, 2024 17:09
@RaduBerinde RaduBerinde requested a review from jbowens December 9, 2024 17:09
@cockroach-teamcity
Copy link
Member

This change is Reviewable

@RaduBerinde RaduBerinde force-pushed the fix-store-properties-dir-check branch 2 times, most recently from 26573c6 to f05227c Compare December 9, 2024 17:19
Copy link
Collaborator

@jbowens jbowens 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 3 of 3 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @RaduBerinde)

We use `filepath.Rel` to associate a data directory with a mountpoint,
but the code incorrectly tolerates a result which starts with `../`.
This commit adds a check for this case.

Fixes: cockroachdb#137021

Release note (bug fix): Fixed bug that causes an incorrect filesystem
to be logged as part of the store information.
@RaduBerinde RaduBerinde force-pushed the fix-store-properties-dir-check branch from f05227c to 46a3e88 Compare December 9, 2024 22:42
@RaduBerinde
Copy link
Member Author

Test failure is #136592

bors r+

@craig craig bot merged commit 4b31b16 into cockroachdb:master Dec 10, 2024
22 of 23 checks passed
@RaduBerinde RaduBerinde deleted the fix-store-properties-dir-check branch December 15, 2024 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-24.1.x Flags PRs that need to be backported to 24.1. backport-24.2.x Flags PRs that need to be backported to 24.2 backport-24.3.x Flags PRs that need to be backported to 24.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

storage: filesystem reporting seems buggy
3 participants