Skip to content

Commit

Permalink
quattor/types/hardware: Ensure max_threads is not less than number of…
Browse files Browse the repository at this point in the history
… cores
  • Loading branch information
jrha committed Sep 11, 2024
1 parent 93e4c56 commit 3926d21
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions quattor/types/hardware.pan
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ type structure_cpu = {
deprecated(0, 'The hyperthreading cpu property has been deprecated, please migrate to max_threads');
true;
}
} with {
if (exists(SELF['max_threads']) && SELF['max_threads'] < SELF['cores']) {
error("Number of execution threads (max_threads) cannot be less than number of CPU cores (cores)");
} else {
true;
};
};


Expand Down

0 comments on commit 3926d21

Please sign in to comment.