@@ -13,7 +13,6 @@ import (
13
13
"github.com/go-kit/log"
14
14
"github.com/go-kit/log/level"
15
15
"github.com/pkg/errors"
16
- perrors "github.com/pkg/errors"
17
16
"github.com/prometheus/client_golang/prometheus"
18
17
"go.uber.org/atomic"
19
18
@@ -419,7 +418,7 @@ func (i *Lifecycler) loop(ctx context.Context) error {
419
418
// First, see if we exist in the cluster, update our state to match if we do,
420
419
// and add ourselves (without tokens) if we don't.
421
420
if err := i .initRing (context .Background ()); err != nil {
422
- return perrors .Wrapf (err , "failed to join the ring %s" , i .RingName )
421
+ return errors .Wrapf (err , "failed to join the ring %s" , i .RingName )
423
422
}
424
423
425
424
// We do various period tasks
@@ -464,14 +463,14 @@ func (i *Lifecycler) loop(ctx context.Context) error {
464
463
// let's observe the ring. By using JOINING state, this ingester will be ignored by LEAVING
465
464
// ingesters, but we also signal that it is not fully functional yet.
466
465
if err := i .autoJoin (context .Background (), JOINING ); err != nil {
467
- return perrors .Wrapf (err , "failed to pick tokens in the KV store, ring: %s" , i .RingName )
466
+ return errors .Wrapf (err , "failed to pick tokens in the KV store, ring: %s" , i .RingName )
468
467
}
469
468
470
469
level .Info (i .logger ).Log ("msg" , "observing tokens before going ACTIVE" , "ring" , i .RingName )
471
470
observeChan = time .After (i .cfg .ObservePeriod )
472
471
} else {
473
472
if err := i .autoJoin (context .Background (), ACTIVE ); err != nil {
474
- return perrors .Wrapf (err , "failed to pick tokens in the KV store, ring: %s" , i .RingName )
473
+ return errors .Wrapf (err , "failed to pick tokens in the KV store, ring: %s" , i .RingName )
475
474
}
476
475
}
477
476
}
@@ -561,7 +560,7 @@ heartbeatLoop:
561
560
562
561
if i .ShouldUnregisterOnShutdown () {
563
562
if err := i .unregister (context .Background ()); err != nil {
564
- return perrors .Wrapf (err , "failed to unregister from the KV store, ring: %s" , i .RingName )
563
+ return errors .Wrapf (err , "failed to unregister from the KV store, ring: %s" , i .RingName )
565
564
}
566
565
level .Info (i .logger ).Log ("msg" , "instance removed from the KV store" , "ring" , i .RingName )
567
566
}
0 commit comments