diff --git a/vendor.conf b/vendor.conf index 011529e2..96961e5a 100644 --- a/vendor.conf +++ b/vendor.conf @@ -3,5 +3,5 @@ github.com/rancher/types k8s.io/kubernetes v1.8.3 transitive=true,staging=true bitbucket.org/ww/goautoneg a547fc61f48d567d5b4ec6f8aee5573d8efce11d https://github.com/rancher/goautoneg.git -github.com/rancher/norman 391a96f33dd0b1f893f8b194e2d7cad3e26d1351 +github.com/rancher/norman ee148b4d18535ee26bce4b90380d91a1d9e4ac15 golang.org/x/sync fd80eb99c8f653c847d294a001bdf2a3a6f768f5 diff --git a/vendor/github.com/rancher/norman/controller/generic_controller.go b/vendor/github.com/rancher/norman/controller/generic_controller.go index a1f4816f..dde151c0 100644 --- a/vendor/github.com/rancher/norman/controller/generic_controller.go +++ b/vendor/github.com/rancher/norman/controller/generic_controller.go @@ -98,13 +98,14 @@ func (g *genericController) sync(ctx context.Context) error { DeleteFunc: g.queueObject, }) - logrus.Infof("Starting %s Controller", g.name) + logrus.Infof("Syncing %s Controller", g.name) go g.informer.Run(ctx.Done()) if !cache.WaitForCacheSync(ctx.Done(), g.informer.HasSynced) { return fmt.Errorf("failed to sync controller %s", g.name) } + logrus.Infof("Syncing %s Controller Done", g.name) g.synced = true return nil diff --git a/vendor/github.com/rancher/norman/controller/starter.go b/vendor/github.com/rancher/norman/controller/starter.go index 3a735de9..2c488a17 100644 --- a/vendor/github.com/rancher/norman/controller/starter.go +++ b/vendor/github.com/rancher/norman/controller/starter.go @@ -11,8 +11,15 @@ type Starter interface { Start(ctx context.Context, threadiness int) error } +func SyncThenSync(ctx context.Context, threadiness int, starters ...Starter) error { + if err := Sync(ctx, starters...); err != nil { + return err + } + return Start(ctx, threadiness, starters...) +} + func Sync(ctx context.Context, starters ...Starter) error { - eg, ctx := errgroup.WithContext(ctx) + eg, _ := errgroup.WithContext(ctx) for _, starter := range starters { func(starter Starter) { eg.Go(func() error {