Vendor in containers/storage v1.32.1

Theoretically this should fix the aweful flake we have
been suffering with.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
This commit is contained in:
Daniel J Walsh
2021-05-27 12:34:22 -04:00
parent cd1f99d063
commit c9609d820b
20 changed files with 370 additions and 217 deletions

View File

@@ -788,6 +788,15 @@ func (s *store) load() error {
}
s.containerStore = rcs
for _, store := range driver.AdditionalImageStores() {
gipath := filepath.Join(store, driverPrefix+"images")
ris, err := newROImageStore(gipath)
if err != nil {
return err
}
s.roImageStores = append(s.roImageStores, ris)
}
s.digestLockRoot = filepath.Join(s.runRoot, driverPrefix+"locks")
if err := os.MkdirAll(s.digestLockRoot, 0700); err != nil {
return err
@@ -910,22 +919,10 @@ func (s *store) ImageStore() (ImageStore, error) {
// Store. Accessing these stores directly will bypass locking and
// synchronization, so it is not a part of the exported Store interface.
func (s *store) ROImageStores() ([]ROImageStore, error) {
if len(s.roImageStores) != 0 {
return s.roImageStores, nil
}
driver, err := s.getGraphDriver()
if err != nil {
return nil, err
}
driverPrefix := s.graphDriverName + "-"
for _, store := range driver.AdditionalImageStores() {
gipath := filepath.Join(store, driverPrefix+"images")
ris, err := newROImageStore(gipath)
if err != nil {
return nil, err
}
s.roImageStores = append(s.roImageStores, ris)
if s.imageStore == nil {
return nil, ErrLoadError
}
return s.roImageStores, nil
}
@@ -2655,8 +2652,13 @@ func (s *store) mount(id string, options drivers.MountOpts) (string, error) {
return "", err
}
modified, err := s.graphLock.Modified()
if err != nil {
return "", err
}
/* We need to make sure the home mount is present when the Mount is done. */
if s.graphLock.TouchedSince(s.lastLoaded) {
if modified {
s.graphDriver = nil
s.layerStore = nil
s.graphDriver, err = s.getGraphDriver()