diff options
author | openshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com> | 2022-06-14 13:12:17 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-14 13:12:17 +0000 |
commit | 78ecdad5f8f16dbb6146f2741a3d7ead1ce837bc (patch) | |
tree | c6214d1b51693315139277932ee145a51b13a183 /pkg | |
parent | 9fac1b335f681400a029e9d8014f45fa5634ec40 (diff) | |
parent | 608ad7d1139d80093d1ddd933027d31af7fdee83 (diff) | |
download | podman-78ecdad5f8f16dbb6146f2741a3d7ead1ce837bc.tar.gz podman-78ecdad5f8f16dbb6146f2741a3d7ead1ce837bc.tar.bz2 podman-78ecdad5f8f16dbb6146f2741a3d7ead1ce837bc.zip |
Merge pull request #14580 from jakecorrenti/stats-on-non-running-container
Non-running containers now report statistics via the `podman stats`
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/api/handlers/compat/containers_stats.go | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/pkg/api/handlers/compat/containers_stats.go b/pkg/api/handlers/compat/containers_stats.go index 77b16b03e..6855e369b 100644 --- a/pkg/api/handlers/compat/containers_stats.go +++ b/pkg/api/handlers/compat/containers_stats.go @@ -44,18 +44,6 @@ func StatsContainer(w http.ResponseWriter, r *http.Request) { return } - // If the container isn't running, then let's not bother and return - // immediately. - state, err := ctnr.State() - if err != nil { - utils.InternalServerError(w, err) - return - } - if state != define.ContainerStateRunning { - utils.Error(w, http.StatusConflict, define.ErrCtrStateInvalid) - return - } - stats, err := ctnr.GetContainerStats(nil) if err != nil { utils.InternalServerError(w, errors.Wrapf(err, "failed to obtain Container %s stats", name)) |