Skip to content

Commit 881da91

Browse files
Backport node scalability initialization bug
Co-authored-by: shashank-netapp <[email protected]>
1 parent a74be67 commit 881da91

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

frontend/csi/plugin.go

+6-3
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,9 @@ func (p *Plugin) Activate() error {
387387
if p.role == CSINode || p.role == CSIAllInOne {
388388
p.nodeRegisterWithController(ctx, 0) // Retry indefinitely
389389

390+
// Initialize node scalability limiter.
391+
p.InitializeNodeLimiter(ctx)
392+
390393
// Cleanup any stale volume publication state immediately so self-healing works with current data.
391394
if err := p.performNodeCleanup(ctx); err != nil {
392395
Logc(ctx).WithError(err).Warn("Failed to clean node; self-healing features may be unreliable.")
@@ -400,9 +403,6 @@ func (p *Plugin) Activate() error {
400403
p.startISCSISelfHealingThread(ctx)
401404
p.startNVMeSelfHealingThread(ctx)
402405

403-
// Initialize node scalability limiter.
404-
p.InitializeNodeLimiter(ctx)
405-
406406
if p.enableForceDetach {
407407
p.startReconcilingNodePublications(ctx)
408408
}
@@ -634,6 +634,9 @@ func (p *Plugin) stopNVMeSelfHealingThread(_ context.Context) {
634634
func (p *Plugin) InitializeNodeLimiter(ctx context.Context) {
635635
var err error
636636

637+
Logc(ctx).Debug("Initializing node limiters.")
638+
defer Logc(ctx).Debug("Node limiters initialized.")
639+
637640
if p.limiterSharedMap[NodeStageNFSVolume], err = limiter.New(ctx,
638641
NodeStageNFSVolume,
639642
limiter.TypeSemaphoreN,

0 commit comments

Comments
 (0)