diff options
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/api/handlers/compat/containers_create.go | 1 | ||||
-rw-r--r-- | pkg/api/handlers/compat/secrets.go | 8 | ||||
-rw-r--r-- | pkg/api/handlers/compat/system.go | 1 | ||||
-rw-r--r-- | pkg/domain/infra/abi/system.go | 2 |
4 files changed, 9 insertions, 3 deletions
diff --git a/pkg/api/handlers/compat/containers_create.go b/pkg/api/handlers/compat/containers_create.go index 6e85872b2..4a39e9563 100644 --- a/pkg/api/handlers/compat/containers_create.go +++ b/pkg/api/handlers/compat/containers_create.go @@ -47,6 +47,7 @@ func CreateContainer(w http.ResponseWriter, r *http.Request) { rtc, err := runtime.GetConfig() if err != nil { utils.Error(w, "unable to obtain runtime config", http.StatusInternalServerError, errors.Wrap(err, "unable to get runtime config")) + return } newImage, err := runtime.ImageRuntime().NewFromLocal(body.Config.Image) diff --git a/pkg/api/handlers/compat/secrets.go b/pkg/api/handlers/compat/secrets.go index 571888eba..ff737cddc 100644 --- a/pkg/api/handlers/compat/secrets.go +++ b/pkg/api/handlers/compat/secrets.go @@ -30,7 +30,9 @@ func ListSecrets(w http.ResponseWriter, r *http.Request) { return } if len(query.Filters) > 0 { - utils.Error(w, "filters not supported", http.StatusBadRequest, errors.New("bad parameter")) + utils.Error(w, "filters not supported", http.StatusBadRequest, + errors.Wrapf(errors.New("bad parameter"), "filters not supported")) + return } ic := abi.ContainerEngine{Libpod: runtime} reports, err := ic.SecretList(r.Context()) @@ -95,7 +97,9 @@ func CreateSecret(w http.ResponseWriter, r *http.Request) { return } if len(createParams.Labels) > 0 { - utils.Error(w, "labels not supported", http.StatusBadRequest, errors.New("bad parameter")) + utils.Error(w, "labels not supported", http.StatusBadRequest, + errors.Wrapf(errors.New("bad parameter"), "labels not supported")) + return } decoded, _ := base64.StdEncoding.DecodeString(createParams.Data) diff --git a/pkg/api/handlers/compat/system.go b/pkg/api/handlers/compat/system.go index e21ae160a..66b4236f9 100644 --- a/pkg/api/handlers/compat/system.go +++ b/pkg/api/handlers/compat/system.go @@ -19,6 +19,7 @@ func GetDiskUsage(w http.ResponseWriter, r *http.Request) { df, err := ic.SystemDf(r.Context(), options) if err != nil { utils.InternalServerError(w, err) + return } imgs := make([]*docker.ImageSummary, len(df.Images)) diff --git a/pkg/domain/infra/abi/system.go b/pkg/domain/infra/abi/system.go index f29b98696..c68a12414 100644 --- a/pkg/domain/infra/abi/system.go +++ b/pkg/domain/infra/abi/system.go @@ -82,7 +82,7 @@ func (ic *ContainerEngine) SetupRootless(_ context.Context, cmd *cobra.Command) unitName := fmt.Sprintf("podman-%d.scope", os.Getpid()) if runsUnderSystemd || conf.Engine.CgroupManager == config.SystemdCgroupsManager { if err := utils.RunUnderSystemdScope(os.Getpid(), "user.slice", unitName); err != nil { - logrus.Warnf("Failed to add podman to systemd sandbox cgroup: %v", err) + logrus.Debugf("Failed to add podman to systemd sandbox cgroup: %v", err) } } } |