Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent error messages in case if recommendation is not possible #173

Open
sancyx opened this issue Jan 30, 2019 · 1 comment
Open
Assignees

Comments

@sancyx
Copy link
Member

sancyx commented Jan 30, 2019

If you invoke scaleOut with the below payload, which is the exact cluster layout returned by recommendation call for same resource number, you get an error 400 (could not recommend cluster with the requested resources). However if you set "sumNodes": 1 for t3.medium spot pool you will get error 500 (error: &errors.errorString{s:"there's already enough resources in the cluster. Total resources available: CPU: 4, Mem: 8"}). In case you decrease desiredMem = 3 you'll get the same layout recommendation.
It would desirable to have same behaviour in each case, either return the same clusterLayout or return the same error code and message, since in each case you have enough resources in your cluster.

{
	"desiredCpu":2,
	"desiredMem":4,
	"desiredGpu":0,
	"onDemandPct":80,
	"actualLayout": [
		{
		  "instanceType": "t3.medium",
		  "vmClass": "regular",
		  "sumNodes": 1
		},
		{
		  "instanceType": "t3.medium",
		  "vmClass": "spot",
		  "sumNodes": 0
		},
		{
		  "instanceType": "t2.small",
		  "vmClass": "spot",
		  "sumNodes": 0
		},
		{
		  "instanceType": "t2.medium",
		  "vmClass": "spot",
		  "sumNodes": 0
		},
		{
		  "instanceType": "t2.large",
		  "vmClass": "spot",
		  "sumNodes": 0
		},
		{
		  "instanceType": "t3.large",
		  "vmClass": "spot",
		  "sumNodes": 0
		},
		{
		  "instanceType": "m4.large",
		  "vmClass": "spot",
		  "sumNodes": 0
		}
	]
}```
@waynz0r
Copy link
Member

waynz0r commented Jan 30, 2019

I would not treat there's already enough resources in the cluster as an error.

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

No branches or pull requests

4 participants