18790: Error out instead of retrying if server is too old.
[arvados.git] / lib / controller / localdb / container_gateway.go
index 384f471db0d9b8d5b3a314ae1204c5c8beced8d5..74c00da8b1251fbd8d612d0e46ae6a7144e908dd 100644 (file)
@@ -176,7 +176,7 @@ func (conn *Conn) serveContainerLogViaKeepWeb(opts arvados.ContainerLogOptions,
        myHostname := u.Hostname()
        var webdavBase arvados.URL
        var ok bool
-       for webdavBase = range conn.cluster.Services.WebDAVDownload.InternalURLs {
+       for webdavBase = range conn.cluster.Services.WebDAV.InternalURLs {
                ok = true
                u := url.URL(webdavBase)
                if h := u.Hostname(); h == "127.0.0.1" || h == "0.0.0.0" || h == "::1" || h == myHostname {
@@ -439,7 +439,7 @@ func (conn *Conn) findGateway(ctx context.Context, ctr arvados.Container, noForw
                return func() (net.Conn, string, string, error) {
                        rawconn, err := (&net.Dialer{}).DialContext(ctx, "tcp", ctr.GatewayAddress)
                        if err != nil {
-                               err = httpserver.ErrorWithStatus(err, http.StatusServiceUnavailable)
+                               return nil, "", "", httpserver.ErrorWithStatus(err, http.StatusServiceUnavailable)
                        }
                        return conn.dialGatewayTLS(ctx, ctr, rawconn)
                }, nil, nil
@@ -461,7 +461,7 @@ func (conn *Conn) findGateway(ctx context.Context, ctr arvados.Container, noForw
                return func() (net.Conn, string, string, error) {
                        rawconn, err := tunnel.Open()
                        if err != nil {
-                               err = httpserver.ErrorWithStatus(err, http.StatusServiceUnavailable)
+                               return nil, "", "", httpserver.ErrorWithStatus(err, http.StatusServiceUnavailable)
                        }
                        return conn.dialGatewayTLS(ctx, ctr, rawconn)
                }, nil, nil