Browse Source

[TRAIN and before] Introduce ContainerCpusetCpus

Add a role specific parameter, ContainerCpusetCpus, default to 'all', which
allows to limit the specific CPUs or cores a container can use.
To disable it and rely on container engine default, set it to ''.

Change-Id: I3b669665548668423d4ce7e34262c12903fba522
Related-Bug: #1867357
(cherry picked from commit 85850d8af2)
changes/21/713121/1
Emilien Macchi 4 months ago
parent
commit
fec0dfb47d
2 changed files with 15 additions and 1 deletions
  1. +9
    -1
      docker/services/nova-libvirt.yaml
  2. +6
    -0
      releasenotes/notes/cpuset_cpus-4dbde2cec2152b30.yaml

+ 9
- 1
docker/services/nova-libvirt.yaml View File

@@ -131,6 +131,12 @@ parameters:
type: string
tags:
- role_specific
ContainerCpusetCpus:
description: Limit the specific CPUs or cores a container can use.
type: string
default: 'all'
tags:
- role_specific

conditions:

@@ -188,9 +194,11 @@ resources:
map_replace:
- map_replace:
- vhostuser_socket_group: VhostuserSocketGroup
container_cpuset_cpus: ContainerCpusetCpus
- values: {get_param: [RoleParameters]}
- values:
VhostuserSocketGroup: {get_param: VhostuserSocketGroup}
ContainerCpusetCpus: {get_param: ContainerCpusetCpus}


ContainersCommon:
@@ -324,7 +332,7 @@ outputs:
pid: host
privileged: true
restart: always
cpuset_cpus: all
cpuset_cpus: {get_attr: [RoleParametersValue, value, container_cpuset_cpus]}
volumes:
list_concat:
- {get_attr: [ContainersCommon, volumes]}


+ 6
- 0
releasenotes/notes/cpuset_cpus-4dbde2cec2152b30.yaml View File

@@ -0,0 +1,6 @@
---
features:
- |
Add a role specific parameter, ContainerCpusetCpus, default to 'all', which
allows to limit the specific CPUs or cores a container can use.
To disable it and rely on container engine default, set it to ''.

Loading…
Cancel
Save