Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-08-14 17:09:58 +0300
committerStan Hu <stanhu@gmail.com>2018-08-14 17:09:58 +0300
commit24204ec7eed6359aa3aaaca4073cbbe2ced4817c (patch)
treee57ea7b0e0795f8464645882296b3f6f1c7baf11 /internal/domain
parent7edf64c1951e2184890403ab60c26381dd81e942 (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/domain')
-rw-r--r--internal/domain/map.go2
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()