workers == 0 meaning == cpu_count is broken

Bug #1362102 reported by James Westby
12
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/proxy-server.conf
workers = 0

This is because

 if workers == '0':
    import multiprocessing
    workers = multiprocessing.cpu_count()

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

Revision history for this message
Tom Haddon (mthaddon) wrote :

To be clear, with the default setting (workers: 0) we'd expect workers to be set to multiprocessing.cpu_count() rather than 0.

tags: added: openstack
Seyeong Kim (seyeongkim)
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
James Page (james-page)
Changed in swift-proxy (Juju Charms Collection):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.