-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
Added nano_cpus parameter in the docker_container.py file. #38063
Conversation
Fixes: GH 34320 Signed-off-by: Amol Kahat <akahat@redhat.com>
Why is it called "nano_cpus"? What does nano means?
What are the units? Is it between 0-1 or 0-100% or 0-num-cpus? --cpus=value option is much simpler:
|
@amolkahat there are several ways to limit CPU with the docker API. This blog says:
So it's not just changing the name but the way it works. |
I think we should offer something like About implementing this: I noticed that |
@@ -48,6 +48,11 @@ | |||
- Command to execute when the container starts. | |||
A command may be either a string or a list. | |||
Prior to version 2.4, strings were split on commas. | |||
nano_cpus: | |||
description: | |||
- Specify how much CPU resources a container can use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although the name says "nano", it would be interesting to tell the unit. In this case is 1e-9.
Hi,
If you're the PR author, and you want to start the conversation back up, please:
If you're a community member, and you want to see this change merged, please:
If you've like to help with the Docker modules please comment on the Docker Agenda/Task List How to rebase a branch: https://docs.ansible.com/ansible/latest/dev_guide/developing_rebasing.html needs_info |
SUMMARY
Added nano_cpus parameter in the docker_container.py file.
Fixes: #34320
Signed-off-by: Amol Kahat akahat@redhat.com
ISSUE TYPE
COMPONENT NAME
docker_container
ANSIBLE VERSION