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

v2.1: use create_and_canonicalize_directory for snapshots dir (backport of #3923) #3969

Merged
merged 1 commit into from
Dec 6, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Dec 6, 2024

Problem

we don't create "snapshots" dir for users before we canonicalize.

Summary of Changes

do something similar with ledger path:

agave/validator/src/main.rs

Lines 997 to 1004 in df27fb3

let ledger_path = create_and_canonicalize_directories([&ledger_path])
.unwrap_or_else(|err| {
eprintln!(
"Unable to access ledger path '{}': {err}",
ledger_path.display(),
);
exit(1);
})


This is an automatic backport of pull request #3923 done by [Mergify](https://mergify.com).

* fix snapshot path

* feedback

(cherry picked from commit 31606f5)
@mergify mergify bot assigned yihau Dec 6, 2024
@mergify mergify bot requested a review from a team as a code owner December 6, 2024 03:55
@yihau
Copy link
Member

yihau commented Dec 6, 2024

the main reason for this bp is that it's a patch for this bug:

when we run agave-validator --snapshots SNAPSHOTS_PATH_THAT_DOES_NOT_EXIST ..., it canonicalizes the path directly without creating dirs for non-existent paths. it will report you something like:

Failed to canonicalize snapshots path '/home/sol/ledger-snapshots': No such file or directory (os error 2)

@yihau yihau requested review from brooksprumo and steviez December 6, 2024 04:19
Copy link

@bw-solana bw-solana left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@steviez steviez left a comment

Choose a reason for hiding this comment

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

LGTM

@yihau yihau merged commit c526431 into v2.1 Dec 6, 2024
28 checks passed
@yihau yihau deleted the mergify/bp/v2.1/pr-3923 branch December 6, 2024 17:19
KirillLykov pushed a commit that referenced this pull request Dec 9, 2024
…rt of #3923) (#3969)

use create_and_canonicalize_directory for snapshots dir (#3923)

* fix snapshot path

* feedback

(cherry picked from commit 31606f5)

Co-authored-by: Yihau Chen <yihau.chen@icloud.com>
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.

4 participants