diff --git a/cmd/tempo/app/modules.go b/cmd/tempo/app/modules.go index 8a0e4e172a8..29461f28d94 100644 --- a/cmd/tempo/app/modules.go +++ b/cmd/tempo/app/modules.go @@ -262,7 +262,10 @@ func (t *App) stopMemberlistKV() error { defer cancelFunc() t.memberlistKV.StopAsync() - t.memberlistKV.AwaitTerminated(ctx) + err := t.memberlistKV.AwaitTerminated(ctx) + if err != nil { + return fmt.Errorf("Failed to stop memberlist %w", err) + } return nil } diff --git a/pkg/distributor/distributor.go b/pkg/distributor/distributor.go index ce152b82b03..6202f22ed1f 100644 --- a/pkg/distributor/distributor.go +++ b/pkg/distributor/distributor.go @@ -2,6 +2,7 @@ package distributor import ( "context" + "fmt" "net/http" "strconv" "sync" @@ -139,7 +140,10 @@ func New(cfg Config, clientCfg ingester_client.Config, ingestersRing ring.ReadRi ctx, cancelFunc := context.WithTimeout(context.Background(), 10*time.Second) defer cancelFunc() - services.StartAndAwaitRunning(ctx, d.pool) + err := services.StartAndAwaitRunning(ctx, d.pool) + if err != nil { + return nil, fmt.Errorf("Failed to start distributor pool %w", err) + } return d, nil } diff --git a/pkg/ingester/ingester_test.go b/pkg/ingester/ingester_test.go index 26270162fbf..4f80d28518b 100644 --- a/pkg/ingester/ingester_test.go +++ b/pkg/ingester/ingester_test.go @@ -144,7 +144,7 @@ func TestWal(t *testing.T) { } func defaultIngester(t *testing.T, tmpDir string) (*Ingester, []*tempopb.Trace, [][]byte) { - ingesterConfig := defaultIngesterTestConfig(t) + ingesterConfig := defaultIngesterTestConfig() limits, err := validation.NewOverrides(defaultLimitsTestConfig()) assert.NoError(t, err, "unexpected error creating overrides") @@ -193,7 +193,7 @@ func defaultIngester(t *testing.T, tmpDir string) (*Ingester, []*tempopb.Trace, return ingester, traces, traceIDs } -func defaultIngesterTestConfig(t *testing.T) Config { +func defaultIngesterTestConfig() Config { cfg := Config{} flagext.DefaultValues(&cfg) cfg.FlushCheckPeriod = 99999 * time.Hour