diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-06-17 16:51:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-17 16:51:51 +0200 |
commit | 78ad57ebd35acac59ffa6c7b8231ffaf9e0c1f7a (patch) | |
tree | dbc59dfdb4533b7558c8e2dede2ccea339297f3e /pkg/api | |
parent | 200afe7a942b294401714980502b80a549b92fb1 (diff) | |
parent | c51c593ff630719d9d897319a7afabf412580d68 (diff) | |
download | podman-78ad57ebd35acac59ffa6c7b8231ffaf9e0c1f7a.tar.gz podman-78ad57ebd35acac59ffa6c7b8231ffaf9e0c1f7a.tar.bz2 podman-78ad57ebd35acac59ffa6c7b8231ffaf9e0c1f7a.zip |
Merge pull request #6636 from mheon/add_warnings
Re-add resource limit warnings to Specgen
Diffstat (limited to 'pkg/api')
-rw-r--r-- | pkg/api/handlers/libpod/containers_create.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/api/handlers/libpod/containers_create.go b/pkg/api/handlers/libpod/containers_create.go index 71f440bce..8fbff9be7 100644 --- a/pkg/api/handlers/libpod/containers_create.go +++ b/pkg/api/handlers/libpod/containers_create.go @@ -22,7 +22,8 @@ func CreateContainer(w http.ResponseWriter, r *http.Request) { utils.Error(w, "Something went wrong.", http.StatusInternalServerError, errors.Wrap(err, "Decode()")) return } - if err := generate.CompleteSpec(r.Context(), runtime, &sg); err != nil { + warn, err := generate.CompleteSpec(r.Context(), runtime, &sg) + if err != nil { utils.InternalServerError(w, err) return } @@ -31,6 +32,6 @@ func CreateContainer(w http.ResponseWriter, r *http.Request) { utils.InternalServerError(w, err) return } - response := entities.ContainerCreateResponse{ID: ctr.ID()} + response := entities.ContainerCreateResponse{ID: ctr.ID(), Warnings: warn} utils.WriteJSON(w, http.StatusCreated, response) } |