fix: NameError in ResourcePoolScaling.manage() fallback path#155
Merged
Conversation
…back
The fallback path in manage() when ResourcePool.get() returns None
references an undefined variable `name` instead of `self.resource_pool_name`.
This causes a NameError that crashes the handler on every retry.
The bug is masked when ResourcePool.get() succeeds from cache (line 103),
but when the cache misses, the fallback on line 105 always fails:
NameError: name 'name' is not defined. Did you mean: 'self.name'?
This blocks all ResourcePoolScaling operations, preventing shared cluster
pools from scaling up.
jkupferer
approved these changes
May 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
name→self.resource_pool_nameinResourcePoolScaling.manage()line 105Problem
When
ResourcePool.get()returnsNone(cache miss), the fallback fetch on line 105 references an undefined variablename:This raises
NameError: name 'name' is not definedand crashes the handler on every retry (60s interval). AllResourcePoolScalingoperations are blocked, preventing shared cluster pools from scaling up.Impact on production (ocp-us-west-2): 4 ResourcePoolScaling objects stuck in
waitingstate with 1,050+ retries, blocking pool provisioning for multiple Summit 2026 labs.Fix
Why it wasn't caught earlier
The bug is on a fallback path —
ResourcePool.get()on line 103 normally succeeds from the in-memory cache, so line 105 is rarely reached. It only triggers when the cache misses, e.g., after operator restart or when a new ResourcePoolScaling is created before the ResourcePool is cached.