workers == 0 meaning == cpu_count is broken
Bug #1362102 reported by
James Westby
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
swift-proxy (Juju Charms Collection) |
Fix Released
|
Medium
|
Seyeong Kim |
Bug Description
From a deploy that has workers: 0 in the config:
grep workers /etc/swift/
workers = 0
This is because
if workers == '0':
import multiprocessing
workers = multiprocessing
when the config.yaml has
workers:
default: 0
type: int
so workers will be 0 not "0".
The check needs to be fixed to compare with the correct type.
Thanks,
James
Related branches
lp:~seyeongkim/charms/trusty/swift-proxy/lp1362102
- Edward Hope-Morley: Approve
- OpenStack Charmers: Pending requested
-
Diff: 145 lines (+12/-7)4 files modifiedMakefile (+1/-1)
config.yaml (+10/-0)
hooks/swift_context.py (+1/-1)
tests/basic_deployment.py (+0/-5)
tags: | added: openstack |
Changed in swift-proxy (Juju Charms Collection): | |
status: | New → In Progress |
assignee: | nobody → Seyeong Kim (xtrusia) |
Changed in swift-proxy (Juju Charms Collection): | |
importance: | Undecided → Medium |
milestone: | none → 15.04 |
tags: | added: backport-potential cts |
Changed in swift-proxy (Juju Charms Collection): | |
status: | In Progress → Fix Committed |
Changed in swift-proxy (Juju Charms Collection): | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
To be clear, with the default setting (workers: 0) we'd expect workers to be set to multiprocessing .cpu_count( ) rather than 0.