[WIP] store: Make additionalimagestores configurable as layerstore source #20604
Cirrus CI / Build for fedora-39β
failed
Nov 6, 2023 in 6m 53s
Task Summary
Instruction postbuild failed in 00:32
Details
✅ 00:22 clone
✅ 00:09 prebuild
✅ 00:03 setup
✅ 05:40 main
❌ 00:32 postbuild
- intialStore := store
- store := strings.Split(store, "|")[0]
if !filepath.IsAbs(store) {
return nil, fmt.Errorf("overlay: image path %q is not absolute. Can not be relative", store)
}
@@ -519,7 +517,7 @@ func parseOptions(options []string) (*overlayOptions, error) {
if !st.IsDir() {
return nil, fmt.Errorf("overlay: image path %q must be a directory", store)
}
- o.imageStores = append(o.imageStores, intialStore)
+ o.imageStores = append(o.imageStores, store)
}
case "additionallayerstore":
logrus.Debugf("overlay: additionallayerstore=%s", val)
@@ -1212,7 +1210,6 @@ func (d *Driver) dir2(id string) (string, string, bool) {
}
if _, err := os.Stat(newpath); err != nil {
for _, p := range d.AdditionalImageStores() {
- p = strings.Split(p, "|")[0]
l := path.Join(p, d.name, id)
_, err = os.Stat(l)
if err == nil {
@@ -1595,7 +1592,6 @@ func (d *Driver) get(id string, disableShifting bool, options graphdriver.MountO
newpath := path.Join(d.home, l)
if st, err := os.Stat(newpath); err != nil {
for _, p := range d.AdditionalImageStores() {
- p = strings.Split(p, "|")[0]
lower = path.Join(p, d.name, l)
if st2, err2 := os.Stat(lower); err2 == nil {
if !permsKnown {
diff --git a/vendor/github.com/containers/storage/store.go b/vendor/github.com/containers/storage/store.go
index 105db22c2..6753b296f 100644
--- a/vendor/github.com/containers/storage/store.go
+++ b/vendor/github.com/containers/storage/store.go
@@ -945,7 +945,6 @@ func (s *store) load() error {
s.containerStore = rcs
for _, store := range driver.AdditionalImageStores() {
- store = strings.Split(store, "|")[0]
gipath := filepath.Join(store, driverPrefix+"images")
var ris roImageStore
if s.imageStoreDir != "" && store == s.graphRoot {
@@ -1110,13 +1109,6 @@ func (s *store) getROLayerStoresLocked() ([]roLayerStore, error) {
return nil, err
}
for _, store := range s.graphDriver.AdditionalImageStores() {
- if strings.Contains(store, "|") {
- parts := strings.Split(store, "|")
- if parts[1] == "NO_REUSE" {
- continue
- }
- store = strings.Split(store, "|")[0]
- }
glpath := filepath.Join(store, driverPrefix+"layers")
rls, err := newROLayerStore(rlpath, glpath, s.graphDriver)
if err != nil {
Loading