Open kyujin-cho opened 3 months ago
We made a glossary related to VFolder deletion.
move to trash
: transit VFolder status to DELETE_PENDING
and actual contents remainsdelete forever
: delete the actual contents of the VFolderrestore
: transit VFolder status from DELETE_PENDING
to READY
Does this issue suggest to replace delete forever
with flush
or add support for flush
?
Since the filesystem-level deletion process can take a long time, or gets failed and retried afterwards, we should show a small notice to the users like: "The deletion process and restoring the available storage space may take up to 12 hours."
Motivation
File operations take a long time and are very fragile. Backend.AI should assume that vfolder deletion process can fail at any time.
Currently, there are two design issues:
This is a follow-up to:
575 (#713)
1892
1915
and the completion of:
767
Proposed implementation details
Decoupling user account purging and vfolder deletion
Moving to trash bin
DELETE /vfolders
orDELETE /vfolders/{name}
APIDELETE_PENDING
.Deleting forever
DELETE /vfolders/delete-from-trash-bin
APIDELETE_{ONGOING|ERROR}
state.DELETE_PENDING
state with their owner users/projects gone.POST /vfolders/flush
,...
API,DELETE_ONGOING
.DELETE_COMPLETED
.DELETE_ERROR
(and store the error log somewhere?)DELETE_{ONGOING|ERROR}
states multiple times, we need #2116 as well.1797 (#1884)
History cleanup
DELETE_COMPLETE
state after the data rentention period.User removes database record of VFolder inDELETE_COMPLETED
status by callingDELETE /vfolders/purge
APIbackend.ai mgr clear-history
.