Skip to content

Commit

Permalink
Merge pull request #563 from jakobmoellerdev/topology-queue-shutdown
Browse files Browse the repository at this point in the history
OCPEDGE-815: fix: pending shutdown on topology queue
  • Loading branch information
openshift-merge-bot[bot] authored Jan 29, 2024
2 parents 0a16e1e + a1702fe commit 3ea3dd6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions internal/csi/provisioner.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,16 @@ func (p *Provisioner) Start(ctx context.Context) error {
logger.Info(fmt.Sprintf("using %s/%s %s as owner of CSIStorageCapacity objects", controllerRef.APIVersion, controllerRef.Kind, controllerRef.Name))
rateLimiter := workqueue.NewItemExponentialFailureRateLimiter(time.Second, 5*time.Minute)

topologyQueue := workqueue.NewRateLimitingQueueWithConfig(rateLimiter, workqueue.RateLimitingQueueConfig{
Name: "csitopology",
})

topologyInformer := topology.NewNodeTopology(
p.options.DriverName,
clientset,
factory.Core().V1().Nodes(),
factory.Storage().V1().CSINodes(),
workqueue.NewRateLimitingQueueWithConfig(rateLimiter, workqueue.RateLimitingQueueConfig{
Name: "csitopology",
}),
topologyQueue,
)

managedByID := "external-provisioner"
Expand Down Expand Up @@ -280,6 +282,7 @@ func (p *Provisioner) Start(ctx context.Context) error {
}()
go func() {
defer wg.Done()
defer topologyQueue.ShutDown()
provisionController.Run(ctx)
logger.Info("provisioner controller finished shutdown")
}()
Expand Down

0 comments on commit 3ea3dd6

Please sign in to comment.