From d5e48cfd659fe3870d336884ead4b932c8336be1 Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Tue, 4 Jun 2024 08:12:57 -0700 Subject: [PATCH] fix: remove DriveOPTimeout for REST callers as they don't work properly (#19873) Go's net/http is notoriously difficult to have a streaming deadlines per READ/WRITE on the net.Conn if we add them they interfere with the Go's internal requirements for a HTTP connection. Remove this support for now fixes #19853 --- .github/workflows/mint.yml | 7 ++++--- cmd/logging.go | 4 ++++ cmd/server-main.go | 13 +++++++------ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/mint.yml b/.github/workflows/mint.yml index 014673391..d465e1d74 100644 --- a/.github/workflows/mint.yml +++ b/.github/workflows/mint.yml @@ -55,9 +55,10 @@ jobs: run: | ${GITHUB_WORKSPACE}/.github/workflows/run-mint.sh "erasure" "minio" "minio123" "${{ steps.vars.outputs.sha_short }}" - - name: resiliency - run: | - ${GITHUB_WORKSPACE}/.github/workflows/run-mint.sh "resiliency" "minio" "minio123" "${{ steps.vars.outputs.sha_short }}" + # FIXME: renable this back when we have a valid way to add deadlines for PUT()s (internode CreateFile) + # - name: resiliency + # run: | + # ${GITHUB_WORKSPACE}/.github/workflows/run-mint.sh "resiliency" "minio" "minio123" "${{ steps.vars.outputs.sha_short }}" - name: The job must cleanup if: ${{ always() }} diff --git a/cmd/logging.go b/cmd/logging.go index 769486f11..9f3088d2c 100644 --- a/cmd/logging.go +++ b/cmd/logging.go @@ -8,6 +8,10 @@ import ( "github.com/minio/minio/internal/logger" ) +func proxyLogIf(ctx context.Context, err error, errKind ...interface{}) { + logger.LogIf(ctx, "proxy", err, errKind...) +} + func replLogIf(ctx context.Context, err error, errKind ...interface{}) { logger.LogIf(ctx, "replication", err, errKind...) } diff --git a/cmd/server-main.go b/cmd/server-main.go index d477466d3..938d6176e 100644 --- a/cmd/server-main.go +++ b/cmd/server-main.go @@ -414,11 +414,12 @@ func serverHandleCmdArgs(ctxt serverCtxt) { setGlobalInternodeInterface(ctxt.Interface) globalTCPOptions = xhttp.TCPOptions{ - UserTimeout: int(ctxt.UserTimeout.Milliseconds()), - DriveOPTimeout: globalDriveConfig.GetOPTimeout, - Interface: ctxt.Interface, - SendBufSize: ctxt.SendBufSize, - RecvBufSize: ctxt.RecvBufSize, + UserTimeout: int(ctxt.UserTimeout.Milliseconds()), + // FIXME: Bring this back when we have valid way to handle deadlines + // DriveOPTimeout: globalDriveConfig.GetOPTimeout, + Interface: ctxt.Interface, + SendBufSize: ctxt.SendBufSize, + RecvBufSize: ctxt.RecvBufSize, } // allow transport to be HTTP/1.1 for proxying. @@ -430,7 +431,7 @@ func serverHandleCmdArgs(ctxt serverCtxt) { RoundTripper: globalRemoteTargetTransport, Logger: func(err error) { if err != nil && !errors.Is(err, context.Canceled) { - replLogIf(GlobalContext, err) + proxyLogIf(GlobalContext, err) } }, })