summaryrefslogtreecommitdiff
path: root/pkg/api
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-06-17 16:51:51 +0200
committerGitHub <noreply@github.com>2020-06-17 16:51:51 +0200
commit78ad57ebd35acac59ffa6c7b8231ffaf9e0c1f7a (patch)
treedbc59dfdb4533b7558c8e2dede2ccea339297f3e /pkg/api
parent200afe7a942b294401714980502b80a549b92fb1 (diff)
parentc51c593ff630719d9d897319a7afabf412580d68 (diff)
downloadpodman-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.go5
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)
}