Commit 76822c36 authored by Geoff Simmons's avatar Geoff Simmons

Bugfix: if the updater is uninitialized, monitor skips the update check

This may happen if the initial cache sync takes longer than the
monitor interval.
parent e65d4270
......@@ -186,18 +186,11 @@ func (vc *Controller) monitor(monitorIntvl time.Duration) {
good = false
}
// if vc.spec == nil {
// vc.warnEvt(updateErr, "VCL spec not initialized, "+
// "not updating Varnish")
// metrics.updateErrs.Inc()
// good = false
// } else if err := vc.Update(vc.spec); err != nil {
// vc.errorEvt(updateErr, "Errors updating Varnish: %+v",
// err)
// metrics.updateErrs.Inc()
// good = false
// }
if err := vc.updater.Update(); err != nil {
if vc.updater == nil {
vc.errorEvt(updateErr, "Updater not initialized")
metrics.updateErrs.Inc()
good = false
} else if err := vc.updater.Update(); err != nil {
vc.errorEvt(updateErr, "Errors updating Varnish: %+v",
err)
metrics.updateErrs.Inc()
......
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