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

Add a "truncated" message to stderr if instance types > Max Results #54

Closed
chimerab opened this issue Sep 12, 2020 · 4 comments
Closed
Labels
enhancement New feature or request pending-release

Comments

@chimerab
Copy link

Use latest release, r5.xlarge have 4 vcpu ,32gb memory , it should list by below criteria but it's not.

$ ./ec2-instance-selector-linux-amd64 --vcpus 4 --memory-min 8 -a x86_64
c5.xlarge
c5a.xlarge
c5d.xlarge
c5n.xlarge
d2.xlarge
g3s.xlarge
g4dn.xlarge
i2.xlarge
i3.xlarge
i3en.xlarge
inf1.xlarge
m1.xlarge
m2.2xlarge
m3.xlarge
m4.xlarge
m5.xlarge
m5a.xlarge
m5ad.xlarge
m5d.xlarge
m5dn.xlarge
$ ./ec2-instance-selector-linux-amd64 --vcpus 4 --memory-min 16 -a x86_64
d2.xlarge
g3s.xlarge
g4dn.xlarge
i2.xlarge
i3.xlarge
i3en.xlarge
m2.2xlarge
m4.xlarge
m5.xlarge
m5a.xlarge
m5ad.xlarge
m5d.xlarge
m5dn.xlarge
m5n.xlarge
p2.xlarge
r3.xlarge
r4.xlarge
r5.xlarge
r5a.xlarge
r5ad.xlarge

with same logic the --vcpu-min works well. Is it design like this?

@bwagner5
Copy link
Contributor

Hey @chimerab , I believe the problem is that the results have been truncated. The default of --max-results is 20 so that you could use all instance types returned for a fleet (LaunchTemplateOverrides have a limit of 20 https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_LaunchTemplate.html).

If you do:

$ ./ec2-instance-selector-linux-amd64 --vcpus 4 --memory-min 8 -a x86_64 --max-results 300
c5.xlarge
c5a.xlarge
c5ad.xlarge
c5d.xlarge
c5n.xlarge
d2.xlarge
g3s.xlarge
g4dn.xlarge
i2.xlarge
i3.xlarge
i3en.xlarge
inf1.xlarge
m1.xlarge
m2.2xlarge
m3.xlarge
m4.xlarge
m5.xlarge
m5a.xlarge
m5ad.xlarge
m5d.xlarge
m5dn.xlarge
m5n.xlarge
p2.xlarge
r3.xlarge
r4.xlarge
r5.xlarge
r5a.xlarge
r5ad.xlarge
r5d.xlarge
r5dn.xlarge
r5n.xlarge
t2.xlarge
t3.xlarge
t3a.xlarge
x1e.xlarge
z1d.xlarge

It might be a good idea for the tool to print on stderr if the results were truncated to max-results, what do you think?

@chimerab
Copy link
Author

chimerab commented Sep 13, 2020

Hi bwagner5 , I think it's my mistake not read the whole help doc. let's keep the current design unless more people ignored the --max-result like me.

@bwagner5
Copy link
Contributor

I still think it would be helpful to log on stderr. I wrote the tool and I've definitely stared at the output asking why an instance type wasn't there only to realize it was truncated :D

@bwagner5 bwagner5 added the enhancement New feature or request label Sep 14, 2020
@bwagner5 bwagner5 changed the title parameter --memory-min seems not working as expected Add a "truncated" message to stderr if instance types > Max Results Oct 19, 2020
@bwagner5
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request pending-release
Projects
None yet
Development

No branches or pull requests

2 participants