oxidecomputer / omicron

Omicron: Oxide control plane
Mozilla Public License 2.0
251 stars 39 forks source link

Disallow negative silo quota CPU value #6333

Open david-crespo opened 2 months ago

david-crespo commented 2 months ago

Nexus does not prevent you from setting silo quotas to a negative number.

image

This results in an unfortunate utilization situation:

Screenshot 2024-08-14 at 3 46 25 PM

hawkw commented 2 months ago

Yeah, it probably shouldn't let you do that...

david-crespo commented 2 months ago

Let's try and sneak this into v10.

david-crespo commented 2 months ago

Thanks @augustuswm for pointing out that memory and storage already disallow negative values because they are ByteCounts.

https://github.com/oxidecomputer/omicron/blob/54b387871e17579f9ad30166d4b7522ddc18ba31/nexus/types/src/external_api/params.rs#L375-L385