[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
)
This commit is contained in:
parent
d7cd9268df
commit
fec0dfb47d
|
@ -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]}
|
||||
|
|
|
@ -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…
Reference in New Issue