Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

not all vcpus are available in the containers #219

Closed
devimc opened this issue Apr 23, 2018 · 0 comments
Closed

not all vcpus are available in the containers #219

devimc opened this issue Apr 23, 2018 · 0 comments
Assignees

Comments

@devimc
Copy link

devimc commented Apr 23, 2018

Description of problem

docker run --cpus 5 -ti busybox sh -c "sleep 5; nproc"

don't show the right number of vCPUs

now that our kernel supports cpuSet libcontainer places the container inside a CPU cgroup with the number of vCPUs available when it is created. VCPUs are hotplugged and connected asynchronously, not all vCPUs are available when the container is created causing this issue1

Expected result

6 = 1 cold added + 5 hot added

Actual result

random, sometimes 3 or 4

see kata-containers/tests#250

@devimc devimc self-assigned this Apr 23, 2018
devimc pushed a commit to devimc/kata-agent that referenced this issue Apr 23, 2018
Each time a container is created, it is placed inside a cpuset cgroup
with the actual number of vCPUs, when more vCPUs are hot added this cgroup
MUST BE updated to allow containers accessing to these new resources. The
cpuset cgroup is not updated if the container already have one defined by user.

fixes kata-containers#219

Signed-off-by: Julio Montes <[email protected]>
devimc pushed a commit to devimc/kata-agent that referenced this issue Apr 23, 2018
Each time a container is created, it is placed inside a cpuset cgroup
with the actual number of vCPUs, when more vCPUs are hot added this cgroup
MUST BE updated to allow containers accessing to these new resources. The
cpuset cgroup is not updated if the container already have one defined by user.

fixes kata-containers#219

Signed-off-by: Julio Montes <[email protected]>
devimc pushed a commit to devimc/kata-agent that referenced this issue Apr 25, 2018
Each time a container is created, it is placed inside a cpuset cgroup
with the actual number of vCPUs, when more vCPUs are hot added this cgroup
MUST BE updated to allow containers accessing to these new resources. The
cpuset cgroup is not updated if the container already have one defined by user.

fixes kata-containers#219

Signed-off-by: Julio Montes <[email protected]>
devimc pushed a commit to devimc/kata-agent that referenced this issue Apr 25, 2018
Each time a container is created, it is placed inside a cpuset cgroup
with the actual number of vCPUs, when more vCPUs are hot added this cgroup
MUST BE updated to allow containers accessing to these new resources. The
cpuset cgroup is not updated if the container already have one defined by user.

fixes kata-containers#219

Signed-off-by: Julio Montes <[email protected]>
devimc pushed a commit to devimc/kata-agent that referenced this issue Apr 30, 2018
Each time a container is created, it is placed inside a cpuset cgroup
with the actual number of vCPUs, when more vCPUs are hot added this cgroup
MUST BE updated to allow containers accessing to these new resources. The
cpuset cgroup is not updated if the container already have one defined by user.

fixes kata-containers#219

Signed-off-by: Julio Montes <[email protected]>
devimc pushed a commit to devimc/kata-agent that referenced this issue Apr 30, 2018
Each time a container is created, it is placed inside a cpuset cgroup
with the actual number of vCPUs, when more vCPUs are hot added this cgroup
MUST BE updated to allow containers accessing to these new resources. The
cpuset cgroup is not updated if the container already have one defined by user.

fixes kata-containers#219

Signed-off-by: Julio Montes <[email protected]>
devimc pushed a commit to devimc/kata-agent that referenced this issue May 2, 2018
Each time a container is created, it is placed inside a cpuset cgroup
with the actual number of vCPUs, when more vCPUs are hot added this cgroup
MUST BE updated to allow containers accessing to these new resources. The
cpuset cgroup is not updated if the container already have one defined by user.

fixes kata-containers#219

Signed-off-by: Julio Montes <[email protected]>
@chavafg chavafg closed this as completed in d96b8e1 May 2, 2018
jshachm pushed a commit to jshachm/agent that referenced this issue Nov 22, 2018
Each time a container is created, it is placed inside a cpuset cgroup
with the actual number of vCPUs, when more vCPUs are hot added this cgroup
MUST BE updated to allow containers accessing to these new resources. The
cpuset cgroup is not updated if the container already have one defined by user.

fixes kata-containers#219

Signed-off-by: Julio Montes <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant