-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Panic when etcd-snapshot-dir
does not exist
#9316
Comments
Issue found on master branch with commit de82584Environment DetailsInfrastructure
Node(s) CPU architecture, OS, and Version:
Cluster Configuration:
Config.yaml:
Testing Steps
Expected behavior: Step 3: Perform etcd-snapshot operations: save, prune, list, delete - none of them should have a seg fault. Should exit gracefully. Reproducing Results/Observations:
Prune operation output:
|
Moving this out to the next release to fix the prune subcommand. |
Validated on master branch with commit 364dfd8Environment DetailsInfrastructure
Node(s) CPU architecture, OS, and Version:
Cluster Configuration:
Config.yaml:
Testing Steps
Validation Results:
Save:
Prune:
List:
Delete:
|
K3s tracking issue for:
If the target snapshot dir does not exist, the etcd snapshot will fail, and the subsequent reconcile in
listLocalSnapshots
will panic when attempting to walk the nonexistent path.There is another race condition if a scheduled snapshot and manual snapshot run at the same time, and one of them prunes files out from underneath the other. There is locking in the snapshot code path, but it is essentially useless because it is a mutex within the server process, and the cron scheduler already ensures only a single execution at a time - and it does nothing to help with multiple snapshots taken by separate processes. We should fix that as well, if possible.
The text was updated successfully, but these errors were encountered: