deis / controller

Deis Workflow Controller (API)
https://deis.com
MIT License
41 stars 53 forks source link

Limits validation #784

Closed sstarcher closed 8 years ago

sstarcher commented 8 years ago

running - deis limits:set -c 2000 -m 6G

2000 doesn't fit format type=#unit or type=#
Examples: web=2G worker=500M web=300
6G doesn't fit format type=#unit or type=#
Examples: web=2G worker=500M web=300
Applying limits... .o.

If neither fits what are we applying?

It resulted in

=== app Limits

--- Memory
memory     10gb

--- CPU
Unlimited
sstarcher commented 8 years ago

Certainly the above is entirely user error, but the results were odd. The correct steps were

deis limits:set cmd=6G
deis limits:set --cpu cmd=2000
helgi commented 8 years ago

Looks like part of this needs to be addressed in the CLI (https://github.com/deis/workflow-cli)

bacongobbler commented 8 years ago

the second comment is how you use it. You can only set CPU or memory at one point in the CLI, since --cpu and --memory are boolean flags to determine which type of limit your are setting. Perhaps deis limits:cpu or deis limits:memory would have been a better choice in hindsight, but then it would've been confusing on the invocation of deis limits:unset.

@helgi 's got the right idea.

bacongobbler commented 8 years ago

considering that this has been fixed I'm going to close it, but please feel free to re-open a new ticket at https://github.com/deis/workflow-cli if you feel this needs to change.