MAAS selection of node for juju constraints does not choose "best/least-capable" match
Bug #1417793 reported by
Clark Laughlin
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Wishlist
|
Raphaël Badin |
Bug Description
I have a combination of different nodes in MAAS:
* arch=amd64, cpu-cores=4, mem=8GB
* arch=amd64, cpu-cores=8, mem=32GB
* arch=arm64, cpu-cores=8, mem=32GB
I am using "juju add-machine" and desire to select a node that has a lower-number of cores. When I specify "--constraints cpu-cores=4", I get an 8-core machine. When I specify "--constraints cpu-cores=3", I still get an 8-core machine.
The same is true when I specify "--constraints mem=4GB".
I expect to have a machine selected that is the lowest-capable match for the constraints. Instead, I seem to get the first match, which might be based on database order or some other ordering.
Related branches
lp:~rvb/maas/use-cost-in-acquire
- Blake Rouse (community): Approve
-
Diff: 66 lines (+29/-5)3 files modifiedsrc/maasserver/node_constraint_filter_forms.py (+9/-1)
src/maasserver/tests/test_node_constraint_filter_forms.py (+20/-0)
src/maasserver/views/tests/test_nodes.py (+0/-4)
Changed in maas: | |
importance: | Undecided → Wishlist |
status: | New → Triaged |
Changed in maas: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
a quick search through the code shows no filtering for the result set for the node that best matches, just a first item off the result set.