Skip to content

Fix bug with checking if node is overallocated#4727

Merged
JamesMurkin merged 2 commits intomasterfrom
fix_allocatable_bug
Mar 2, 2026
Merged

Fix bug with checking if node is overallocated#4727
JamesMurkin merged 2 commits intomasterfrom
fix_allocatable_bug

Conversation

@JamesMurkin
Copy link
Contributor

A recent PR fixed MarkResourceUnallocatable

However that inadvertently caused another bug where the resource is removed before we check if the node is overallocated

The upshot of this is we consider a node overallocated when it isn't. Due to marking resource unallocatable before comparing it to what is allocated

  • Resulting in allocated > allocatable and deeming it overallocated

Now we check if a node is overallocated before we mark any resource unallocatable - resulting in the expected behaviour

A recent PR fixed MarkResourceUnallocatable
 - https://github.com/armadaproject/armada/pull/4714/changes#diff-1586be9e6d66471f316b4f536803e03351ba2b47132b9e34d0b6d4332101e5c2R859

However that inadvertently caused another bug where the resource is removed before we check if the node is overallocated

The upshot of this is we consider a node overallocated when it isn't. Due to marking resource unallocatable before comparing it to what is allocated
 - Resulting in allocated > allocatable and deeming it overallocated

Now we check if a node is overallocated before we mark any resource unallocatable - resulting in the expected behaviour

Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com>
Signed-off-by: JamesMurkin <jamesmurkin@hotmail.com>
@JamesMurkin JamesMurkin marked this pull request as ready for review February 27, 2026 21:07
@JamesMurkin JamesMurkin merged commit d6028fc into master Mar 2, 2026
16 checks passed
@JamesMurkin JamesMurkin deleted the fix_allocatable_bug branch March 2, 2026 11:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants