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

RunInstances API call, attempt multiple instance types #263

Closed
symonds opened this issue Jun 7, 2018 · 5 comments
Closed

RunInstances API call, attempt multiple instance types #263

symonds opened this issue Jun 7, 2018 · 5 comments

Comments

@symonds
Copy link

symonds commented Jun 7, 2018

Issue type

  • Feature Idea

Summary

When using the new RunInstances API call (https://github.com/cristim/autospotting/pull/257) and there is high demand on the instance type AWS responds with InsufficientInstanceCapacity

Which Autospotting returns

2018/06/07 11:56:39 instance.go:306: Couldn't launch spot instance: InsufficientInstanceCapacity: There is no Spot capacity available that matches your request.
	status code: 500, request id: 3045e3ba-c3f0-40d1-903b-92327ec3b5c1
2018/06/07 11:56:39 autoscaling.go:337: Could not launch cheapest spot instance: InsufficientInstanceCapacity: There is no Spot capacity available that matches your request.
	status code: 500, request id: 3045e3ba-c3f0-40d1-903b-92327ec3b5c1

It would be nice if Autospotting went back to getCheapestCompatibleSpotInstanceType with the failed instance type appended to disallowedList and attempted to bid for the next cheapest instance.

I would limit this action to 3 attempts.

@cristim
Copy link
Member

cristim commented Jun 7, 2018

This is a great proposal, thanks!

@cristim
Copy link
Member

cristim commented Jun 21, 2018

I'm thinking to just iterate over the list of compatible/allowed instance types ordered increasingly by price and launch them one by one until we get one that can be launched successfully.

We'd only skip the run if all of them failed.

@sunnynew
Copy link

sunnynew commented Sep 7, 2018

Hi @cristim

First of all congrats on this wonderful tool.

Just wanted to know about this particular issue, anytime soon can we expect a fix. As you mentioned just make Autospotting to iterate over all instance type mentioned in allowed_instance_types list.

This will be a lifesaver.

Thanks!

@cristim
Copy link
Member

cristim commented Sep 7, 2018

@sunnynew thanks for your feedback, I appreciate it.

I'm now focusing on #294 so I'm not planning to work on this in the very near future, but feel free to take it over and contribute a PR if you need this so badly and have some time to spare.

I can help you with guidance if you need any.

@cristim
Copy link
Member

cristim commented Dec 11, 2018

Fixed in #306

@cristim cristim closed this as completed Dec 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants