diff options
author | Stan Hu <stanhu@gmail.com> | 2018-08-14 17:09:58 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-08-14 17:09:58 +0300 |
commit | 24204ec7eed6359aa3aaaca4073cbbe2ced4817c (patch) | |
tree | e57ea7b0e0795f8464645882296b3f6f1c7baf11 /internal | |
parent | 7edf64c1951e2184890403ab60c26381dd81e942 (diff) |
Abort domain scan if a failure is encountered
This prevents the total domain list to be cleared out completely while
the system is running.
Closes https://gitlab.com/gitlab-com/infrastructure/issues/4749
Diffstat (limited to 'internal')
-rw-r--r-- | internal/domain/map.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/domain/map.go b/internal/domain/map.go index 943f5c20..d4a9764c 100644 --- a/internal/domain/map.go +++ b/internal/domain/map.go @@ -206,6 +206,8 @@ func Watch(rootDomain string, updater domainsUpdater, interval time.Duration) { dm := make(Map) if err := dm.ReadGroups(rootDomain); err != nil { log.WithError(err).Warn("domain scan failed") + metrics.FailedDomainUpdates.Inc() + continue } duration := time.Since(started).Seconds() |