Skip to content
Permalink
Browse files
fix(host-cleanup): host cleanup not working without --docker-server-s…
…torage-path option

Signed-off-by: Timofey Kirillov <timofey.kirillov@flant.com>
  • Loading branch information
distorhead committed Feb 18, 2022
1 parent a78df7c commit dfa159cba16be7ecf0ca73764f9b57e0d5f3f38c
Showing with 2 additions and 2 deletions.
  1. +1 −1 pkg/host_cleaning/host_cleanup.go
  2. +1 −1 pkg/host_cleaning/local_docker_server.go
@@ -80,7 +80,7 @@ func RunAutoHostCleanup(ctx context.Context, options AutoHostCleanupOptions) err
if options.AllowedLocalCacheVolumeUsageMarginPercentage != nil {
args = append(args, "--allowed-docker-storage-volume-usage-margin", fmt.Sprintf("%d", *options.AllowedLocalCacheVolumeUsageMarginPercentage))
}
if options.DockerServerStoragePath != nil {
if options.DockerServerStoragePath != nil && *options.DockerServerStoragePath != "" {
args = append(args, "--docker-server-storage-path", *options.DockerServerStoragePath)
}

@@ -60,7 +60,7 @@ func GetLocalDockerServerStoragePath(ctx context.Context) (string, error) {

func getDockerServerStoragePath(ctx context.Context, dockerServerStoragePathOption *string) (string, error) {
var dockerServerStoragePath string
if dockerServerStoragePathOption != nil {
if dockerServerStoragePathOption != nil && *dockerServerStoragePathOption != "" {
dockerServerStoragePath = *dockerServerStoragePathOption
} else {
path, err := GetLocalDockerServerStoragePath(ctx)

0 comments on commit dfa159c

Please sign in to comment.