Browse Source

Don't set cpuset_cpus if empty

If cpuset_cpus is set to '', we don't want to configure it, just skip
it.

Closes-Bug: #1867357
Change-Id: I615c798bdbcc0115f0ca9642969193ceada9b9cd
(cherry picked from commit 7bb9471423)
(cherry picked from commit 37ac1e99a6)
(cherry picked from commit 22315435e4)
changes/20/713120/1
Emilien Macchi 3 months ago
parent
commit
811db58e98
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      paunch/builder/compose1.py

+ 1
- 1
paunch/builder/compose1.py View File

@@ -195,7 +195,7 @@ class ComposeV1Builder(object):
cmd.append('--cpu-shares=%s' % cconfig['cpu_shares'])
if 'security_opt' in cconfig:
cmd.append('--security-opt=%s' % cconfig['security_opt'])
if 'cpuset_cpus' in cconfig:
if 'cpuset_cpus' in cconfig and cconfig['cpuset_cpus'] != '':
# 'all' is a special value to directly configure all CPUs
# that are available.
if cconfig['cpuset_cpus'] == 'all':


Loading…
Cancel
Save