Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/internal/dvcr_cleaner.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Successful

## Garbage collector

When all removing operations are finished, run the `garbage collect`:
When all removal operations are finished and there are no virtual disks in the `provisioning` phase, run the `garbage collect`:
```bash
k exec -it -n d8-virtualization dvcr-84c4bffc46-tkgvq -c dvcr -- dvcr-cleaner gc run
? Confirm? [y/N] y█
Expand Down
2 changes: 1 addition & 1 deletion docs/internal/dvcr_cleaner.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Successful

## Сборщик мусора

Когда все операции по удалению образов завершены, необходимо запустить `garbage collect`:
Когда все операции по удалению образов завершены и нет виртуальных дисков в фазе `provisioning`, необходимо запустить `garbage collect`:
```bash
k exec -it -n d8-virtualization dvcr-84c4bffc46-tkgvq -c dvcr -- dvcr-cleaner gc run
? Confirm? [y/N] y█
Expand Down
2 changes: 2 additions & 0 deletions images/dvcr-artifact/cmd/dvcr-cleaner/cmd/gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ var gcRunCmd = &cobra.Command{
return nil
}

// This directory contains data from virtual disks in the `provisioning` phase.
// GC can safely run for virtual disks if there are no disks in the `provisioning` phase.
vdCachePath := fmt.Sprintf("%s/vd", RepoDir)
err = os.RemoveAll(vdCachePath)
if err != nil {
Expand Down
Loading