diff options
Diffstat (limited to 'libpod')
-rw-r--r-- | libpod/boltdb_state.go | 6 | ||||
-rw-r--r-- | libpod/boltdb_state_internal.go | 4 | ||||
-rw-r--r-- | libpod/runtime_ctr.go | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/libpod/boltdb_state.go b/libpod/boltdb_state.go index 122dd080f..5df3e8961 100644 --- a/libpod/boltdb_state.go +++ b/libpod/boltdb_state.go @@ -879,7 +879,7 @@ func (s *BoltState) ContainerInUse(ctr *Container) ([]string, error) { ctrDB := ctrBucket.Bucket([]byte(ctr.ID())) if ctrDB == nil { ctr.valid = false - return errors.Wrapf(define.ErrNoSuchCtr, "no container with ID %s found in DB", ctr.ID()) + return errors.Wrapf(define.ErrNoSuchCtr, "no container with ID %q found in DB", ctr.ID()) } dependsBkt := ctrDB.Bucket(dependenciesBkt) @@ -1669,7 +1669,7 @@ func (s *BoltState) RewriteContainerConfig(ctr *Container, newCfg *ContainerConf ctrDB := ctrBkt.Bucket([]byte(ctr.ID())) if ctrDB == nil { ctr.valid = false - return errors.Wrapf(define.ErrNoSuchCtr, "no container with ID %s found in DB", ctr.ID()) + return errors.Wrapf(define.ErrNoSuchCtr, "no container with ID %q found in DB", ctr.ID()) } if err := ctrDB.Put(configKey, newCfgJSON); err != nil { @@ -1767,7 +1767,7 @@ func (s *BoltState) SafeRewriteContainerConfig(ctr *Container, oldName, newName ctrDB := ctrBkt.Bucket([]byte(ctr.ID())) if ctrDB == nil { ctr.valid = false - return errors.Wrapf(define.ErrNoSuchCtr, "no container with ID %s found in DB", ctr.ID()) + return errors.Wrapf(define.ErrNoSuchCtr, "no container with ID %q found in DB", ctr.ID()) } if err := ctrDB.Put(configKey, newCfgJSON); err != nil { diff --git a/libpod/boltdb_state_internal.go b/libpod/boltdb_state_internal.go index cf8f1c175..d4994334f 100644 --- a/libpod/boltdb_state_internal.go +++ b/libpod/boltdb_state_internal.go @@ -1055,9 +1055,9 @@ func (s *BoltState) lookupContainerID(idOrName string, ctrBucket, namesBucket, n return nil, err } else if !exists { if isPod { - return nil, errors.Wrapf(define.ErrNoSuchCtr, "%s is a pod, not a container", idOrName) + return nil, errors.Wrapf(define.ErrNoSuchCtr, "%q is a pod, not a container", idOrName) } - return nil, errors.Wrapf(define.ErrNoSuchCtr, "no container with name or ID %s found", idOrName) + return nil, errors.Wrapf(define.ErrNoSuchCtr, "no container with name or ID %q found", idOrName) } return id, nil } diff --git a/libpod/runtime_ctr.go b/libpod/runtime_ctr.go index 661ca7ff8..19690d79b 100644 --- a/libpod/runtime_ctr.go +++ b/libpod/runtime_ctr.go @@ -714,7 +714,7 @@ func (r *Runtime) evictContainer(ctx context.Context, idOrName string, removeVol id, err := r.state.LookupContainerID(idOrName) if err != nil { - return "", errors.Wrapf(err, "failed to find container %q in state", idOrName) + return "", err } // Begin by trying a normal removal. Valid containers will be removed normally. @@ -744,7 +744,7 @@ func (r *Runtime) evictContainer(ctx context.Context, idOrName string, removeVol return id, err } if !exists { - return id, errors.Wrapf(err, "failed to find container ID %q for eviction", id) + return id, err } // Re-create a container struct for removal purposes |