From 865cf68b832994ad232844bccaa44a45035d47a2 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Wed, 20 Sep 2023 15:24:06 +0200 Subject: [PATCH 1/2] pkg/config: remove *DirSet fields They are not correctly and inconcistently being used by Podman making it super hard to know what's going on. Just remove them for now and deal with the remaining chaos in subsequent changes in common and Podman. Signed-off-by: Valentin Rothberg --- pkg/config/config.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 0cfe042fc..64bd403a2 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -561,24 +561,6 @@ type SetOptions struct { // backwards compatibility with older versions of libpod for which we must // query the database configuration. Not included in the on-disk config. StorageConfigGraphDriverNameSet bool `toml:"-"` - - // StaticDirSet indicates if the StaticDir has been explicitly set by the - // config or by the user. It's required to guarantee backwards compatibility - // with older versions of libpod for which we must query the database - // configuration. Not included in the on-disk config. - StaticDirSet bool `toml:"-"` - - // VolumePathSet indicates if the VolumePath has been explicitly set by the - // config or by the user. It's required to guarantee backwards compatibility - // with older versions of libpod for which we must query the database - // configuration. Not included in the on-disk config. - VolumePathSet bool `toml:"-"` - - // TmpDirSet indicates if the TmpDir has been explicitly set by the config - // or by the user. It's required to guarantee backwards compatibility with - // older versions of libpod for which we must query the database - // configuration. Not included in the on-disk config. - TmpDirSet bool `toml:"-"` } // NetworkConfig represents the "network" TOML config table From 5e6ac49ab8390924e09ec10d220024c8efd469a9 Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Thu, 21 Sep 2023 10:46:07 +0200 Subject: [PATCH 2/2] pkg/config: do NOT set StaticDir and VolumeDir Let callers (i.e., Podman) decide which defaults to chose. This way, callers know when to override defaults (i.e., when the values are empty). Signed-off-by: Valentin Rothberg --- pkg/config/default.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/pkg/config/default.go b/pkg/config/default.go index 4b1537c75..77c8ae21d 100644 --- a/pkg/config/default.go +++ b/pkg/config/default.go @@ -301,8 +301,6 @@ func defaultEngineConfig() (*EngineConfig, error) { c.graphRoot = storeOpts.GraphRoot c.ImageCopyTmpDir = getDefaultTmpDir() - c.StaticDir = filepath.Join(storeOpts.GraphRoot, "libpod") - c.VolumePath = filepath.Join(storeOpts.GraphRoot, "volumes") c.VolumePluginTimeout = DefaultVolumePluginTimeout c.CompressionFormat = "gzip"