pool.waitall needed in dhcp-agent sync_state

Bug #1257514 reported by Ed Bak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Ed Bak
Havana
Fix Released
Undecided
Unassigned

Bug Description

While debugging an issue in the dhcp-agent, I noticed that it was difficult to determine when sync_state completes. I would like to add the following pool.waitall and LOG message to the sync_state method.

for network in active_networks:
    pool.spawn_n(self.safe_configure_dhcp_for_network, network)
pool.waitall()
LOG.info(_('Synchronizing state complete'))

Ed Bak (ed-bak2)
Changed in neutron:
assignee: nobody → Ed Bak (ed-bak2)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/59863

Changed in neutron:
status: New → In Progress
Revision history for this message
Nachi Ueno (nati-ueno) wrote :

The ease of debugging is only reason for this bug report?

Revision history for this message
Ed Bak (ed-bak2) wrote :

And to ensure that the last pool of threads are complete before another sync_state begins.

Kyle Mestery (mestery)
Changed in neutron:
importance: Undecided → Low
milestone: none → icehouse-2
Revision history for this message
Jian Wen (wenjianhn) wrote :

Ed, I think you need to add commet #3 to the commit msg of your patch.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/59863
Committed: http://github.com/openstack/neutron/commit/9f6ff7e312e6d6ddfc520bcfa8a4f40cf5806845
Submitter: Jenkins
Branch: master

commit 9f6ff7e312e6d6ddfc520bcfa8a4f40cf5806845
Author: Ed Bak <email address hidden>
Date: Tue Dec 3 23:00:23 2013 +0000

    Change to improve dhcp-agent sync_state

    Added a pool.waitall to dhcp-agent sync_state
    to ensure that the last pool of threads are complete
    before another sync_state begins. Added another
    log message to aid in debugging. Also added the
    test_sync_state_waitall unit test.

    Change-Id: I13d79a212672c4086e3082783743cb1ef2b48cfb
    Closes-Bug: #1257514

Changed in neutron:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to neutron (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/60541

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to neutron (master)

Reviewed: https://review.openstack.org/60541
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=5d75bf762f02466648d961b8c5fa7a65de6e709d
Submitter: Jenkins
Branch: master

commit 5d75bf762f02466648d961b8c5fa7a65de6e709d
Author: armando-migliaccio <email address hidden>
Date: Fri Dec 6 07:31:53 2013 -0800

    Switch to using spawn to properly treat errors during sync_state

    Changes f1b9ac5a and 9f6ff7e3 were aimed at improving the robustness
    of the sync_state method. However both missed switching from spawn_n
    to spawn to properly deal with raised exceptions.

    Change-Id: Ieda4a5ecca63de67d8a9757962e7e3383fd9c9ea
    Related-bug: #1257514

Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: icehouse-2 → 2014.1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/98635

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/havana)

Reviewed: https://review.openstack.org/98635
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=3c5a11c900c3ce9b9c23aecd64808a49cd7035bd
Submitter: Jenkins
Branch: stable/havana

commit 3c5a11c900c3ce9b9c23aecd64808a49cd7035bd
Author: Ed Bak <email address hidden>
Date: Tue Dec 3 23:00:23 2013 +0000

    Change to improve dhcp-agent sync_state

    Added a pool.waitall to dhcp-agent sync_state
    to ensure that the last pool of threads are complete
    before another sync_state begins. Added another
    log message to aid in debugging. Also added the
    test_sync_state_waitall unit test.

    Change-Id: I13d79a212672c4086e3082783743cb1ef2b48cfb
    Closes-Bug: #1257514
    (cherry picked from commit 9f6ff7e312e6d6ddfc520bcfa8a4f40cf5806845)

tags: added: in-stable-havana
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.