Skip to content

Commit

Permalink
Merge pull request #15982 from mheon/backport_15799_411rhel
Browse files Browse the repository at this point in the history
[v4.1.1-rhel] Backport #15799
  • Loading branch information
openshift-merge-robot committed Sep 28, 2022
2 parents 0b030cc + 272280f commit 75e92a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libpod/container.go
Expand Up @@ -342,7 +342,9 @@ func (c *Container) specFromState() (*spec.Spec, error) {
return nil, errors.Wrapf(err, "error reading container config")
}
if err := json.Unmarshal(content, &returnSpec); err != nil {
return nil, errors.Wrapf(err, "error unmarshalling container config")
// Malformed spec, just use c.config.Spec instead
logrus.Warnf("Error unmarshalling container %s config: %v", c.ID(), err)
return c.config.Spec, nil
}
} else if !os.IsNotExist(err) {
// ignore when the file does not exist
Expand Down

0 comments on commit 75e92a2

Please sign in to comment.