summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-01-08 05:34:49 -0800
committerGitHub <noreply@github.com>2019-01-08 05:34:49 -0800
commit1ebed882836d78db79a6b1d2f175208d58f39bef (patch)
treeb359bbf1da8d7016395261c2f3a273d59f4b716d
parentfaa24627bb19d67b0e7a681673deb58922a634c1 (diff)
parent454ad71fd46035d0e4f005f0188bc38a51ec0ee7 (diff)
downloadpodman-1ebed882836d78db79a6b1d2f175208d58f39bef.tar.gz
podman-1ebed882836d78db79a6b1d2f175208d58f39bef.tar.bz2
podman-1ebed882836d78db79a6b1d2f175208d58f39bef.zip
Merge pull request #2101 from vrothberg/vendor-buildah
vendor latest buildah
-rw-r--r--vendor.conf2
-rw-r--r--vendor/github.com/containers/buildah/imagebuildah/build.go1
-rw-r--r--vendor/github.com/containers/buildah/pkg/blobcache/blobcache.go20
3 files changed, 17 insertions, 6 deletions
diff --git a/vendor.conf b/vendor.conf
index 9af218d15..18283cae6 100644
--- a/vendor.conf
+++ b/vendor.conf
@@ -92,7 +92,7 @@ k8s.io/kube-openapi 275e2ce91dec4c05a4094a7b1daee5560b555ac9 https://github.com/
k8s.io/utils 258e2a2fa64568210fbd6267cf1d8fd87c3cb86e https://github.com/kubernetes/utils
github.com/mrunalp/fileutils master
github.com/varlink/go master
-github.com/containers/buildah a4200ae6b590c4b08b223e45513b1894636d1d02
+github.com/containers/buildah e7ca330f923701dba8859f5c014d0a9a3f7f0a49
github.com/Nvveen/Gotty master
github.com/fsouza/go-dockerclient master
github.com/openshift/imagebuilder master
diff --git a/vendor/github.com/containers/buildah/imagebuildah/build.go b/vendor/github.com/containers/buildah/imagebuildah/build.go
index d838260e7..217bcfc79 100644
--- a/vendor/github.com/containers/buildah/imagebuildah/build.go
+++ b/vendor/github.com/containers/buildah/imagebuildah/build.go
@@ -517,6 +517,7 @@ func (b *Executor) Run(run imagebuilder.Run, config docker.Config) error {
Hostname: config.Hostname,
Runtime: b.runtime,
Args: b.runtimeArgs,
+ NoPivot: os.Getenv("BUILDAH_NOPIVOT") != "",
Mounts: convertMounts(b.transientMounts),
Env: config.Env,
User: config.User,
diff --git a/vendor/github.com/containers/buildah/pkg/blobcache/blobcache.go b/vendor/github.com/containers/buildah/pkg/blobcache/blobcache.go
index ae55316b0..31e6a428c 100644
--- a/vendor/github.com/containers/buildah/pkg/blobcache/blobcache.go
+++ b/vendor/github.com/containers/buildah/pkg/blobcache/blobcache.go
@@ -52,14 +52,18 @@ type BlobCache interface {
type blobCacheReference struct {
reference types.ImageReference
+ // WARNING: The contents of this directory may be accessed concurrently,
+ // both within this process and by multiple different processes
directory string
compress types.LayerCompression
}
type blobCacheSource struct {
- reference *blobCacheReference
- source types.ImageSource
- sys types.SystemContext
+ reference *blobCacheReference
+ source types.ImageSource
+ sys types.SystemContext
+ // this mutex synchronizes the counters below
+ mu sync.Mutex
cacheHits int64
cacheMisses int64
cacheErrors int64
@@ -219,7 +223,7 @@ func (s *blobCacheSource) GetManifest(ctx context.Context, instanceDigest *diges
}
func (s *blobCacheSource) HasThreadSafeGetBlob() bool {
- return false
+ return s.source.HasThreadSafeGetBlob()
}
func (s *blobCacheSource) GetBlob(ctx context.Context, blobinfo types.BlobInfo, cache types.BlobInfoCache) (io.ReadCloser, int64, error) {
@@ -232,16 +236,22 @@ func (s *blobCacheSource) GetBlob(ctx context.Context, blobinfo types.BlobInfo,
filename := filepath.Join(s.reference.directory, makeFilename(blobinfo.Digest, isConfig))
f, err := os.Open(filename)
if err == nil {
+ s.mu.Lock()
s.cacheHits++
+ s.mu.Unlock()
return f, size, nil
}
if !os.IsNotExist(err) {
+ s.mu.Lock()
s.cacheErrors++
+ s.mu.Unlock()
return nil, -1, errors.Wrapf(err, "error checking for cache file %q", filepath.Join(s.reference.directory, filename))
}
}
}
+ s.mu.Lock()
s.cacheMisses++
+ s.mu.Unlock()
rc, size, err := s.source.GetBlob(ctx, blobinfo, cache)
if err != nil {
return rc, size, errors.Wrapf(err, "error reading blob from source image %q", transports.ImageName(s.reference))
@@ -403,7 +413,7 @@ func saveStream(wg *sync.WaitGroup, decompressReader io.ReadCloser, tempFile *os
}
func (s *blobCacheDestination) HasThreadSafePutBlob() bool {
- return false
+ return s.destination.HasThreadSafePutBlob()
}
func (d *blobCacheDestination) PutBlob(ctx context.Context, stream io.Reader, inputInfo types.BlobInfo, cache types.BlobInfoCache, isConfig bool) (types.BlobInfo, error) {