Skip to content

Commit

Permalink
Merge pull request #20456 from rhatdan/storage
Browse files Browse the repository at this point in the history
not mounted layers should be reported as info not error
  • Loading branch information
openshift-ci[bot] authored Oct 24, 2023
2 parents 83f0772 + 8876380 commit 36b4199
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions libpod/container_internal.go
Original file line number Diff line number Diff line change
Expand Up @@ -1942,9 +1942,12 @@ func (c *Container) cleanupStorage() error {
// error
// We still want to be able to kick the container out of the
// state
if errors.Is(err, storage.ErrNotAContainer) || errors.Is(err, storage.ErrContainerUnknown) || errors.Is(err, storage.ErrLayerNotMounted) {
logrus.Errorf("Storage for container %s has been removed", c.ID())
} else {
switch {
case errors.Is(err, storage.ErrLayerNotMounted):
logrus.Infof("Storage for container %s is not mounted: %v", c.ID(), err)
case errors.Is(err, storage.ErrNotAContainer) || errors.Is(err, storage.ErrContainerUnknown):
logrus.Warnf("Storage for container %s has been removed: %v", c.ID(), err)
default:
reportErrorf("cleaning up container %s storage: %w", c.ID(), err)
}
}
Expand Down

1 comment on commit 36b4199

@packit-as-a-service
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

podman-next COPR build failed. @containers/packit-build please check.

Please sign in to comment.