aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/Microsoft/hcsshim/internal/wclayer/processimage.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-05-14 05:17:38 -0700
committerGitHub <noreply@github.com>2020-05-14 05:17:38 -0700
commitf2f0de430d7545d19ef9505d7f6d8ef46a0d36b9 (patch)
tree0e5a15f979b88eb2e05adb7ac0967dbfcaa7a459 /vendor/github.com/Microsoft/hcsshim/internal/wclayer/processimage.go
parent150679d7b10ad56b7f41d22810eb2c421edf9da5 (diff)
parent1f0cc866d4707c75116d210dc781534c9d7f62fd (diff)
downloadpodman-f2f0de430d7545d19ef9505d7f6d8ef46a0d36b9.tar.gz
podman-f2f0de430d7545d19ef9505d7f6d8ef46a0d36b9.tar.bz2
podman-f2f0de430d7545d19ef9505d7f6d8ef46a0d36b9.zip
Merge pull request #6204 from containers/dependabot/go_modules/github.com/containers/storage-1.19.2
Bump github.com/containers/storage from 1.19.1 to 1.19.2
Diffstat (limited to 'vendor/github.com/Microsoft/hcsshim/internal/wclayer/processimage.go')
-rw-r--r--vendor/github.com/Microsoft/hcsshim/internal/wclayer/processimage.go32
1 files changed, 25 insertions, 7 deletions
diff --git a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/processimage.go b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/processimage.go
index 884207c3e..aabb31368 100644
--- a/vendor/github.com/Microsoft/hcsshim/internal/wclayer/processimage.go
+++ b/vendor/github.com/Microsoft/hcsshim/internal/wclayer/processimage.go
@@ -1,23 +1,41 @@
package wclayer
-import "os"
+import (
+ "context"
+ "os"
+
+ "github.com/Microsoft/hcsshim/internal/oc"
+ "go.opencensus.io/trace"
+)
// ProcessBaseLayer post-processes a base layer that has had its files extracted.
// The files should have been extracted to <path>\Files.
-func ProcessBaseLayer(path string) error {
- err := processBaseImage(path)
+func ProcessBaseLayer(ctx context.Context, path string) (err error) {
+ title := "hcsshim::ProcessBaseLayer"
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(trace.StringAttribute("path", path))
+
+ err = processBaseImage(path)
if err != nil {
- return &os.PathError{Op: "ProcessBaseLayer", Path: path, Err: err}
+ return &os.PathError{Op: title, Path: path, Err: err}
}
return nil
}
// ProcessUtilityVMImage post-processes a utility VM image that has had its files extracted.
// The files should have been extracted to <path>\Files.
-func ProcessUtilityVMImage(path string) error {
- err := processUtilityImage(path)
+func ProcessUtilityVMImage(ctx context.Context, path string) (err error) {
+ title := "hcsshim::ProcessUtilityVMImage"
+ ctx, span := trace.StartSpan(ctx, title)
+ defer span.End()
+ defer func() { oc.SetSpanStatus(span, err) }()
+ span.AddAttributes(trace.StringAttribute("path", path))
+
+ err = processUtilityImage(path)
if err != nil {
- return &os.PathError{Op: "ProcessUtilityVMImage", Path: path, Err: err}
+ return &os.PathError{Op: title, Path: path, Err: err}
}
return nil
}