Commit 8e66c141 authored by Geoff Simmons's avatar Geoff Simmons

Non-timeout network errors are not fatal for removing offloaders.

We assume that haproxy has been stopped (and the Pod may have been
deleted).

Go's "permanent network error" is now deprecated, so we limit this
distinction to timeout errors.
parent 9577b8a9
......@@ -41,6 +41,7 @@ import (
"time"
"code.uplex.de/uplex-varnish/k8s-ingress/pkg/interfaces"
"code.uplex.de/uplex-varnish/k8s-ingress/pkg/net"
"code.uplex.de/uplex-varnish/k8s-ingress/pkg/update"
"github.com/sirupsen/logrus"
......@@ -593,7 +594,9 @@ func (hc *Controller) removeOffldrInstances(
"%d", inst.name, version)
tx, err := inst.dplane.StartTx(version)
if err != nil {
errs = append(errs, inst.mkError(err))
if !net.IsNonTimeoutNetErr(err, hc.log) {
errs = append(errs, inst.mkError(err))
}
continue
}
hc.log.Debugf("haproxy instance %s: started transaction: %+v",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment