num_sync_threads set to 0 when api_workers set to 0

Bug #1436916 reported by Matt Thompson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Fix Released
Undecided
Matt Thompson

Bug Description

We derive num_sync_threads from api_workers (num_sync_threads = {{ neutron_api_workers | default(api_threads) }}). The issue is that whilst api_workers can be 0, num_sync_threads should not be set to 0. We need to add some logic to disallow num_sync_threads from being set to 0.

Revision history for this message
Kevin Carter (kevin-carter) wrote :

we can use a ternary operator to solve this. This should pseudo code should work but is untested:

num_sync_threads = {{ neutron_api_workers | default(api_threads if api_threads > 0 else 1) }}

Changed in openstack-ansible:
status: New → In Progress
assignee: nobody → Matt Thompson (mattt416)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to os-ansible-deployment (master)

Reviewed: https://review.openstack.org/168287
Committed: https://git.openstack.org/cgit/stackforge/os-ansible-deployment/commit/?id=c6d2e2b2354f59dd3f90ee30cec1a80769a4230a
Submitter: Jenkins
Branch: master

commit c6d2e2b2354f59dd3f90ee30cec1a80769a4230a
Author: Matt Thompson <email address hidden>
Date: Fri Mar 27 10:32:52 2015 +0000

    Add neutron neutron_num_sync_threads variable

    In the heat multi node test we were setting neutron_api_workers to 0.
    We then noticed that the dhcp agent wasn't running correctly and Apsu
    traced this back to num_sync_threads being set to 0 (currently, the
    value of neutron_num_sync_threads will get set to neutron_api_workers if
    neutron_api_workers is overriden). While neutron's api_workers config
    option can be set to 0, this is not a usable value for num_sync_threads.

    This commit also changes a few instances of ``VCPUS`` to ``VCPUs`` in
    documentation strings.

    Change-Id: I0f8af934942e6ad58e0c9fd7bfad619d9e98a5bb
    Closes-Bug: #1436916

Changed in openstack-ansible:
status: In Progress → Fix Committed
Changed in openstack-ansible:
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.