Fix reporting errors on container unmount

[NO NEW TESTS NEEDED]
... because testing this would require us to intentionally
create an inconsistent state, which should ideally not be possible...
(and because at this point I don't even know what the reported failure
was.)

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
Miloslav Trmač 2023-05-19 22:13:40 +02:00
parent b15510694b
commit 4969c552ec
1 changed files with 2 additions and 2 deletions

View File

@ -1886,9 +1886,9 @@ func (c *Container) cleanupStorage() error {
logrus.Errorf("Storage for container %s has been removed", c.ID())
} else {
if cleanupErr != nil {
logrus.Errorf("Cleaning up container %s storage: %v", c.ID(), cleanupErr)
logrus.Errorf("Cleaning up container %s storage: %v", c.ID(), err)
} else {
cleanupErr = fmt.Errorf("cleaning up container %s storage: %w", c.ID(), cleanupErr)
cleanupErr = fmt.Errorf("cleaning up container %s storage: %w", c.ID(), err)
}
}
}