Skip to content

Commit e91329e

Browse files
committed
Juggle around order of operations to rudec scope
1 parent fa6893f commit e91329e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

cmd/cortex/main.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,18 +125,15 @@ func main() {
125125
}
126126
defer ring.Stop()
127127
setupDistributor(cfg.distributorConfig, chunkStore, cfg.logSuccess)
128-
if err != nil {
129-
log.Fatalf("Error initializing distributor: %v", err)
130-
}
131128
case modeIngester:
132129
registration, err := ring.RegisterIngester(consul, cfg.listenPort, cfg.numTokens)
133-
prometheus.MustRegister(registration)
134130
if err != nil {
135131
// This only happens for errors in configuration & set-up, not for
136132
// network errors.
137133
log.Fatalf("Could not register ingester: %v", err)
138134
}
139135
defer registration.Unregister()
136+
prometheus.MustRegister(registration)
140137
ing := setupIngester(chunkStore, cfg.ingesterConfig, cfg.logSuccess)
141138
defer ing.Stop()
142139
default:

0 commit comments

Comments
 (0)