Skip to content

Commit

Permalink
fix(host-cleanup): host cleanup not working without --docker-server-s…
Browse files Browse the repository at this point in the history
…torage-path option

Signed-off-by: Timofey Kirillov <timofey.kirillov@flant.com>
  • Loading branch information
distorhead committed Feb 18, 2022
1 parent a78df7c commit dfa159c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/host_cleaning/host_cleanup.go
Expand Up @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/host_cleaning/local_docker_server.go
Expand Up @@ -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)
Expand Down

0 comments on commit dfa159c

Please sign in to comment.