summaryrefslogtreecommitdiff
path: root/libpod/runtime_renumber.go
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2022-07-05 07:23:22 +0000
committerGitHub <noreply@github.com>2022-07-05 07:23:22 +0000
commit773eead54e2e0877e92d5871625a6cc32c582d30 (patch)
tree9463bca52c2c0a9db27c9dd5052fa78c0b27a22a /libpod/runtime_renumber.go
parent3e7e66edad1269420cb45bcabbd93ac4d0e1b585 (diff)
parent597de7a083c329bdaed7fc469555a4142f71bcb8 (diff)
downloadpodman-773eead54e2e0877e92d5871625a6cc32c582d30.tar.gz
podman-773eead54e2e0877e92d5871625a6cc32c582d30.tar.bz2
podman-773eead54e2e0877e92d5871625a6cc32c582d30.zip
Merge pull request #14789 from saschagrunert/libpod-errors
libpod/runtime: switch to golang native error wrapping
Diffstat (limited to 'libpod/runtime_renumber.go')
-rw-r--r--libpod/runtime_renumber.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/libpod/runtime_renumber.go b/libpod/runtime_renumber.go
index db055f40b..9149dd72f 100644
--- a/libpod/runtime_renumber.go
+++ b/libpod/runtime_renumber.go
@@ -1,8 +1,9 @@
package libpod
import (
+ "fmt"
+
"github.com/containers/podman/v4/libpod/events"
- "github.com/pkg/errors"
)
// renumberLocks reassigns lock numbers for all containers and pods in the
@@ -26,7 +27,7 @@ func (r *Runtime) renumberLocks() error {
for _, ctr := range allCtrs {
lock, err := r.lockManager.AllocateLock()
if err != nil {
- return errors.Wrapf(err, "error allocating lock for container %s", ctr.ID())
+ return fmt.Errorf("error allocating lock for container %s: %w", ctr.ID(), err)
}
ctr.config.LockID = lock.ID()
@@ -43,7 +44,7 @@ func (r *Runtime) renumberLocks() error {
for _, pod := range allPods {
lock, err := r.lockManager.AllocateLock()
if err != nil {
- return errors.Wrapf(err, "error allocating lock for pod %s", pod.ID())
+ return fmt.Errorf("error allocating lock for pod %s: %w", pod.ID(), err)
}
pod.config.LockID = lock.ID()
@@ -60,7 +61,7 @@ func (r *Runtime) renumberLocks() error {
for _, vol := range allVols {
lock, err := r.lockManager.AllocateLock()
if err != nil {
- return errors.Wrapf(err, "error allocating lock for volume %s", vol.Name())
+ return fmt.Errorf("error allocating lock for volume %s: %w", vol.Name(), err)
}
vol.config.LockID = lock.ID()