diff --git a/docs/internal/dvcr_cleaner.md b/docs/internal/dvcr_cleaner.md index 5169ecc034..93722049cf 100644 --- a/docs/internal/dvcr_cleaner.md +++ b/docs/internal/dvcr_cleaner.md @@ -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█ diff --git a/docs/internal/dvcr_cleaner.ru.md b/docs/internal/dvcr_cleaner.ru.md index 112c6af91a..371ce5748a 100644 --- a/docs/internal/dvcr_cleaner.ru.md +++ b/docs/internal/dvcr_cleaner.ru.md @@ -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█ diff --git a/images/dvcr-artifact/cmd/dvcr-cleaner/cmd/gc.go b/images/dvcr-artifact/cmd/dvcr-cleaner/cmd/gc.go index 53123c770f..b827981abb 100644 --- a/images/dvcr-artifact/cmd/dvcr-cleaner/cmd/gc.go +++ b/images/dvcr-artifact/cmd/dvcr-cleaner/cmd/gc.go @@ -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 {