add Cachedir and point OCIBlobCache to it
Signed-off-by: Christian Goll <cgoll@suse.com>
This commit is contained in:
committed by
Jonathon Anderson
parent
2627818f76
commit
511938ac5c
@@ -38,6 +38,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||
- Remove NodeInfo (in-memory-only) data structure, consolidating onto NodeConf. #916
|
||||
- Replace `defaults.conf` with settings on the default profile. #917
|
||||
- Switched from yaml.v2 to yaml.v3 #1462
|
||||
- Make OCIBlobCache a seperate path and point it to `/var/cache` #1459
|
||||
|
||||
|
||||
### Removed
|
||||
|
||||
@@ -34,6 +34,7 @@ SYSCONFDIR ?= $(PREFIX)/etc
|
||||
DATADIR ?= $(PREFIX)/share
|
||||
MANDIR ?= $(DATADIR)/man
|
||||
DOCDIR ?= $(DATADIR)/doc
|
||||
CACHEDIR ?= /var/cache
|
||||
|
||||
ifeq ($(USE_LSB_PATHS),true)
|
||||
SRVDIR ?= /srv
|
||||
|
||||
@@ -6,6 +6,7 @@ type BuildConfig struct {
|
||||
Bindir string `default:"@BINDIR@"`
|
||||
Sysconfdir string `default:"@SYSCONFDIR@"`
|
||||
Localstatedir string `default:"@LOCALSTATEDIR@"`
|
||||
Cachedir string `default:"@CACHEDIR@"`
|
||||
Ipxesource string `default:"@IPXESOURCE@"`
|
||||
Srvdir string `default:"@SRVDIR@"`
|
||||
Firewallddir string `default:"@FIREWALLDDIR@"`
|
||||
|
||||
@@ -16,7 +16,6 @@ func TestDefaultRootConf(t *testing.T) {
|
||||
assert.True(t, conf.Warewulf.AutobuildOverlays)
|
||||
assert.True(t, conf.Warewulf.EnableHostOverlay)
|
||||
assert.False(t, conf.Warewulf.Syslog)
|
||||
assert.NotEmpty(t, conf.Warewulf.DataStore)
|
||||
|
||||
assert.True(t, conf.DHCP.Enabled)
|
||||
assert.Equal(t, "default", conf.DHCP.Template)
|
||||
@@ -43,7 +42,6 @@ func TestDefaultRootConf(t *testing.T) {
|
||||
|
||||
assert.NotEmpty(t, conf.Paths.Bindir)
|
||||
assert.NotEmpty(t, conf.Paths.Sysconfdir)
|
||||
assert.NotEmpty(t, conf.Warewulf.DataStore)
|
||||
assert.NotEmpty(t, conf.Paths.Localstatedir)
|
||||
assert.NotEmpty(t, conf.Paths.Srvdir)
|
||||
assert.NotEmpty(t, conf.Paths.Firewallddir)
|
||||
@@ -52,6 +50,7 @@ func TestDefaultRootConf(t *testing.T) {
|
||||
assert.NotEmpty(t, conf.Paths.WWChrootdir)
|
||||
assert.NotEmpty(t, conf.Paths.WWProvisiondir)
|
||||
assert.NotEmpty(t, conf.Paths.WWClientdir)
|
||||
assert.NotEmpty(t, conf.Paths.Cachedir)
|
||||
}
|
||||
|
||||
func TestInitializedFromFile(t *testing.T) {
|
||||
|
||||
@@ -16,7 +16,7 @@ import (
|
||||
)
|
||||
|
||||
func ImportDocker(uri string, name string, sCtx *types.SystemContext) error {
|
||||
OciBlobCacheDir := warewulfconf.Get().Warewulf.DataStore + "/oci"
|
||||
OciBlobCacheDir := path.Join(warewulfconf.Get().Paths.Cachedir + "/warewulf")
|
||||
|
||||
err := os.MkdirAll(OciBlobCacheDir, 0755)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user