summaryrefslogtreecommitdiff
path: root/pkg/api/server/register_ping.go
diff options
context:
space:
mode:
authorJhon Honce <jhonce@redhat.com>2020-02-10 14:24:10 -0700
committerJhon Honce <jhonce@redhat.com>2020-02-17 10:29:32 -0700
commitc0c44ae8a36121dc13f7984cf8b3347c21f43f51 (patch)
tree489bc30b7987a1dcf31ca2e8ba96a370e72e4a86 /pkg/api/server/register_ping.go
parent640b11f0028057ca2090d61c4e460c1afadb226c (diff)
downloadpodman-c0c44ae8a36121dc13f7984cf8b3347c21f43f51.tar.gz
podman-c0c44ae8a36121dc13f7984cf8b3347c21f43f51.tar.bz2
podman-c0c44ae8a36121dc13f7984cf8b3347c21f43f51.zip
Fix handler and systemd activation errors
On panic from handler: log warning and stack trace, report InternalServerError to client When using `podman system service` make determining the listening endpoint deterministic. // When determining _*THE*_ listening endpoint -- // 1) User input wins always // 2) systemd socket activation // 3) rootless honors XDG_RUNTIME_DIR // 4) if varlink -- adapter.DefaultVarlinkAddress // 5) lastly adapter.DefaultAPIAddress Fixes #5150 Fixes #5151 Signed-off-by: Jhon Honce <jhonce@redhat.com>
Diffstat (limited to 'pkg/api/server/register_ping.go')
-rw-r--r--pkg/api/server/register_ping.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/api/server/register_ping.go b/pkg/api/server/register_ping.go
index 086e674a1..349a8a71a 100644
--- a/pkg/api/server/register_ping.go
+++ b/pkg/api/server/register_ping.go
@@ -9,8 +9,8 @@ import (
func (s *APIServer) registerPingHandlers(r *mux.Router) error {
- r.Handle("/_ping", APIHandler(s.Context, handlers.Ping)).Methods(http.MethodGet)
- r.Handle("/_ping", APIHandler(s.Context, handlers.Ping)).Methods(http.MethodHead)
+ r.Handle("/_ping", s.APIHandler(handlers.Ping)).Methods(http.MethodGet)
+ r.Handle("/_ping", s.APIHandler(handlers.Ping)).Methods(http.MethodHead)
// swagger:operation GET /libpod/_ping libpod libpodPingGet
// ---
@@ -61,7 +61,7 @@ func (s *APIServer) registerPingHandlers(r *mux.Router) error {
// determine if talking to Podman engine or another engine
// 500:
// $ref: "#/responses/InternalError"
- r.Handle("/libpod/_ping", APIHandler(s.Context, handlers.Ping)).Methods(http.MethodGet)
- r.Handle("/libpod/_ping", APIHandler(s.Context, handlers.Ping)).Methods(http.MethodHead)
+ r.Handle("/libpod/_ping", s.APIHandler(handlers.Ping)).Methods(http.MethodGet)
+ r.Handle("/libpod/_ping", s.APIHandler(handlers.Ping)).Methods(http.MethodHead)
return nil
}