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

[NBS] Asynchronous disks allocation #2763

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ya-ksgamora
Copy link
Collaborator

@ya-ksgamora ya-ksgamora commented Dec 24, 2024

fix #2945

We want local disks to deallocate asynchronously (disk is deleted instantly, its devices marked dirty and SecureErased afterwards) and allocate synchronously (meaning if there's no clean devices, we use free dirty devices and do not respond to allocation request until dirty devices allocated to disk are secure erased)

This PR acheives that by adding PendingAllocation by example of existing PendingDeallocation.

If devices of the disk are never cleaned, the request will stuck. There are only two cases for local disk device when SecureErase can't succeed:

  • when a target device is in error state
  • when an agent becomes unavailable.

For this reason added check for device/agent's devices pending allocation if they transition to "bad" state

@ya-ksgamora ya-ksgamora force-pushed the users/ya-ksgamora/NBS-5637 branch 3 times, most recently from e6ba142 to 7f1eb3a Compare December 28, 2024 11:01
@ya-ksgamora ya-ksgamora force-pushed the users/ya-ksgamora/NBS-5637 branch 2 times, most recently from 38c1991 to 9842b53 Compare January 14, 2025 13:19
@ya-ksgamora ya-ksgamora force-pushed the users/ya-ksgamora/NBS-5637 branch from 9842b53 to 2460bac Compare January 17, 2025 09:43
@ya-ksgamora ya-ksgamora changed the title NBS-5637: Asynchronous disks allocation [NBS] Asynchronous disks allocation Jan 17, 2025
@komarevtsev-d komarevtsev-d added large-tests Launch large tests for PR blockstore Add this label to run only cloud/blockstore build and tests on PR labels Jan 17, 2025
@ya-ksgamora ya-ksgamora force-pushed the users/ya-ksgamora/NBS-5637 branch from 2460bac to 3590307 Compare January 20, 2025 11:54
@ya-ksgamora ya-ksgamora self-assigned this Jan 20, 2025
@komarevtsev-d
Copy link
Collaborator

Нужно привязать github issue к пулл реквесту и заполнить описание ПРа

@ya-ksgamora ya-ksgamora force-pushed the users/ya-ksgamora/NBS-5637 branch 3 times, most recently from 720fd6e to 6015df7 Compare January 21, 2025 15:48
Copy link
Contributor

Note

This is an automated comment that will be appended during run.

🟢 linux-x86_64-relwithdebinfo: all tests PASSED for commit 6015df7.

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
3777 3777 0 0 0 0

@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 21, 2025
@ya-ksgamora ya-ksgamora force-pushed the users/ya-ksgamora/NBS-5637 branch 3 times, most recently from b6c0697 to 9692eeb Compare January 24, 2025 13:06
@ydb-platform ydb-platform deleted a comment from github-actions bot Jan 24, 2025
Copy link
Contributor

Note

This is an automated comment that will be appended during run.

🟢 linux-x86_64-relwithdebinfo: all tests PASSED for commit 9692eeb.

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
3786 3786 0 0 0 0

@ya-ksgamora ya-ksgamora force-pushed the users/ya-ksgamora/NBS-5637 branch from 9692eeb to 4b7a4d7 Compare January 24, 2025 19:17
Copy link
Contributor

Note

This is an automated comment that will be appended during run.

🟢 linux-x86_64-relwithdebinfo: all tests PASSED for commit 4b7a4d7.

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
3786 3786 0 0 0 0

Copy link
Contributor

Note

This is an automated comment that will be appended during run.

🟢 linux-x86_64-relwithdebinfo: all tests PASSED for commit e12bcae.

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
3789 3789 0 0 0 0

@ya-ksgamora ya-ksgamora force-pushed the users/ya-ksgamora/NBS-5637 branch from e12bcae to 471537b Compare January 28, 2025 12:41
Copy link
Contributor

Note

This is an automated comment that will be appended during run.

🟢 linux-x86_64-relwithdebinfo: all tests PASSED for commit 471537b.

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
3790 3790 0 0 0 0

@sharpeye sharpeye self-requested a review January 29, 2025 16:14
@ya-ksgamora
Copy link
Collaborator Author

TODO:

  1. Тесты:
    • ShouldAllocateWithDirtyLocalDevices - создать диск с грязными девайсами. Подчистить грязные девайсы. Поймать ответ о создании диска
    • ShouldCancelPendingAllocationsOnAgentUnavailable - создать диск с грязными девайсами. Перевести агента в анавейл. Поймать ответ с ошибкой
    • ShouldCancelPendingAllocationsOnDeviceError - как выше, но ломаем девайс
  2. Добавить в TDirtyDevice поле AllocatingDiskId, переименовать DiskId в DeallocatingDiskId и поддержать изменение везде где этот тип применяется (много где). Нужно чтобы уметь читать стейт из локальной базы.

@ya-ksgamora ya-ksgamora force-pushed the users/ya-ksgamora/NBS-5637 branch from 471537b to 4cf02dd Compare February 3, 2025 12:15
Copy link
Contributor

github-actions bot commented Feb 3, 2025

Note

This is an automated comment that will be appended during run.

🟢 linux-x86_64-relwithdebinfo: all tests PASSED for commit 4cf02dd.

TESTS PASSED ERRORS FAILED SKIPPED MUTED?
3791 3791 0 0 0 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blockstore Add this label to run only cloud/blockstore build and tests on PR large-tests Launch large tests for PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[NBS] Asynchronous local disks cleanup and allocation of dirty devices for local disks
2 participants