Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] store: Make additionalimagestores configurable as layerstore source #20604

Closed
wants to merge 1 commit into from

store: Make additionalimagestores configurable as layerstore source

2e14a94
Select commit
Loading
Failed to load commit list.
Closed

[WIP] store: Make additionalimagestores configurable as layerstore source #20604

store: Make additionalimagestores configurable as layerstore source
2e14a94
Select commit
Loading
Failed to load commit list.
Cirrus CI / Build for fedora-39β-aarch64 failed Nov 6, 2023 in 1m 44s

Task Summary

Instruction postbuild failed in 01:08

Details

✅ 00:17 clone
✅ 00:05 prebuild
✅ 00:07 setup
❌ 01:08 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 {