X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/9a1056497d7b7ad18769336489d3a6822547b65a..0596129229750c593066e414d9315f643585bc3e:/lib/controller/handler.go diff --git a/lib/controller/handler.go b/lib/controller/handler.go index f5840b34ce..e1392bef92 100644 --- a/lib/controller/handler.go +++ b/lib/controller/handler.go @@ -13,7 +13,6 @@ import ( "net/url" "strings" "sync" - "time" "git.arvados.org/arvados.git/lib/controller/api" "git.arvados.org/arvados.git/lib/controller/federation" @@ -61,12 +60,6 @@ func (h *Handler) ServeHTTP(w http.ResponseWriter, req *http.Request) { req.URL.Path = strings.Replace(req.URL.Path, "//", "/", -1) } } - if h.Cluster.API.RequestTimeout > 0 { - ctx, cancel := context.WithDeadline(req.Context(), time.Now().Add(time.Duration(h.Cluster.API.RequestTimeout))) - req = req.WithContext(ctx) - defer cancel() - } - h.handlerStack.ServeHTTP(w, req) } @@ -108,7 +101,10 @@ func (h *Handler) setup() { h.federation = federation.New(h.Cluster, &healthFuncs) rtr := router.New(h.federation, router.Config{ MaxRequestSize: h.Cluster.API.MaxRequestSize, - WrapCalls: api.ComposeWrappers(ctrlctx.WrapCallsInTransactions(h.db), oidcAuthorizer.WrapCalls), + WrapCalls: api.ComposeWrappers( + ctrlctx.WrapCallsInTransactions(h.db), + oidcAuthorizer.WrapCalls, + ctrlctx.WrapCallsWithAuth(h.Cluster)), }) healthRoutes := health.Routes{"ping": func() error { _, err := h.db(context.TODO()); return err }} @@ -159,6 +155,7 @@ func (h *Handler) setup() { } go h.trashSweepWorker() + go h.containerLogSweepWorker() } var errDBConnection = errors.New("database connection error")