Skip to content

Commit dfa159c

Browse files
committed
fix(host-cleanup): host cleanup not working without --docker-server-storage-path option
Signed-off-by: Timofey Kirillov <timofey.kirillov@flant.com>
1 parent a78df7c commit dfa159c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/host_cleaning/host_cleanup.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ func RunAutoHostCleanup(ctx context.Context, options AutoHostCleanupOptions) err
8080
if options.AllowedLocalCacheVolumeUsageMarginPercentage != nil {
8181
args = append(args, "--allowed-docker-storage-volume-usage-margin", fmt.Sprintf("%d", *options.AllowedLocalCacheVolumeUsageMarginPercentage))
8282
}
83-
if options.DockerServerStoragePath != nil {
83+
if options.DockerServerStoragePath != nil && *options.DockerServerStoragePath != "" {
8484
args = append(args, "--docker-server-storage-path", *options.DockerServerStoragePath)
8585
}
8686

pkg/host_cleaning/local_docker_server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func GetLocalDockerServerStoragePath(ctx context.Context) (string, error) {
6060

6161
func getDockerServerStoragePath(ctx context.Context, dockerServerStoragePathOption *string) (string, error) {
6262
var dockerServerStoragePath string
63-
if dockerServerStoragePathOption != nil {
63+
if dockerServerStoragePathOption != nil && *dockerServerStoragePathOption != "" {
6464
dockerServerStoragePath = *dockerServerStoragePathOption
6565
} else {
6666
path, err := GetLocalDockerServerStoragePath(ctx)

0 commit comments

Comments
 (0)