Commit 0d9ac205 authored by Geoff Simmons's avatar Geoff Simmons

Fix discard of VCL configs that have gone cold.

I believe this became necessary because the meaning of the state
and temperature fields in vcl.list has changed in recent Varnish
versions (which we are now using).
parent 1e4941c4
......@@ -141,9 +141,10 @@ func (vc *Controller) checkInst(svc string, inst *varnishInst) bool {
"Error getting VCL list at %s: %v", inst, err)
return false
}
vc.log.Tracef("vcl.list at %s: %+v", inst, vcls)
for _, vcl := range vcls {
if strings.HasPrefix(vcl.Name, ingressPrefix) &&
vcl.State == admin.ColdState {
vcl.Temperature == admin.ColdTemp {
if err = adm.VCLDiscard(vcl.Name); err != nil {
vc.errorEvt(svc, discardErr,
"Error discarding VCL %s at %s: "+
......
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