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

[Bug]: some smaller instance types can be provisioned only with resources, not with instance_types #2073

Open
greaber opened this issue Dec 9, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@greaber
Copy link

greaber commented Dec 9, 2024

Steps to reproduce

Try to apply a configuration with the specification

instance_types:
  - t2.small

Actual behaviour

It doesn't work (no offers are shown)

Expected behaviour

It would work. This seems like a bug because you can provision t2.small instances by removing the instance_types constraint and using

resources:
  memory: 2GB
  cpu: 1

dstack version

0.18.29

Server logs

No response

Additional information

No response

@greaber greaber added the bug Something isn't working label Dec 9, 2024
@greaber greaber changed the title [Bug]: some smaller instance types can be provisioned only with resources, not with instance_type [Bug]: some smaller instance types can be provisioned only with resources, not with instance_types Dec 9, 2024
@r4victor
Copy link
Collaborator

@greaber, thanks for reporting. We'll look into it.

Possibly related to #2067.

@r4victor
Copy link
Collaborator

r4victor commented Dec 13, 2024

The issue takes place because the default resources are cpu: 2.. and memory: 8GB.., and the resources are taken into account even if instance_types is specified. To get the behavior expected by @greaber, resources have to be ignored if instance_types is specified. This makes sense, but we need to ensure there is no important case when users specify both resources and instance_types.

Another solution would be to ignore only default resources when users specify instance_types, and if users specify resources explicitly, then take them into account as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants