From c0c44ae8a36121dc13f7984cf8b3347c21f43f51 Mon Sep 17 00:00:00 2001 From: Jhon Honce Date: Mon, 10 Feb 2020 14:24:10 -0700 Subject: 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 --- pkg/api/server/register_version.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pkg/api/server/register_version.go') diff --git a/pkg/api/server/register_version.go b/pkg/api/server/register_version.go index d3b47c2a9..c8f9dcede 100644 --- a/pkg/api/server/register_version.go +++ b/pkg/api/server/register_version.go @@ -6,7 +6,7 @@ import ( ) func (s *APIServer) registerVersionHandlers(r *mux.Router) error { - r.Handle("/version", APIHandler(s.Context, handlers.VersionHandler)) - r.Handle(VersionedPath("/version"), APIHandler(s.Context, handlers.VersionHandler)) + r.Handle("/version", s.APIHandler(handlers.VersionHandler)) + r.Handle(VersionedPath("/version"), s.APIHandler(handlers.VersionHandler)) return nil } -- cgit v1.2.3-54-g00ecf