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

Resources is optional, but if specified, requires CPU and memory #182

Closed
technosophos opened this issue Oct 3, 2019 · 2 comments · May be fixed by #218
Closed

Resources is optional, but if specified, requires CPU and memory #182

technosophos opened this issue Oct 3, 2019 · 2 comments · May be fixed by #218
Labels
bug Something isn't working

Comments

@technosophos
Copy link
Contributor

https://github.com/microsoft/hydra-spec/blob/master/3.component_model.md#resources

Resources is an optional field on a container. But if it is specified, then CPU and Memory are required. This doesn't make sense. CPU and Memory should have sensible defaults and not be required.

@technosophos technosophos added the bug Something isn't working label Oct 3, 2019
@technosophos
Copy link
Contributor Author

Here's how Scylla interprets the spec:

        self.cpu.clone().and_then(|cpu|{
            requests.insert("cpu".to_string(), Quantity(cpu.required.clone()))
        });

That is, if cpu is set, then the required field must be set, and the CPU constraints will be set on the object. If cpu is not set, then we will pass no information on to the implementation.

@technosophos
Copy link
Contributor Author

Okay, it looks like the Scylla/Rudr implementation is incorrect. resources should have been required. I will file a bug there and fix. But I do think that this is the wrong approach; I think resource limits should be optional, and the platform itself should be responsible for sensible defaults.

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

Successfully merging a pull request may close this issue.

1 participant