Error when stopping vcns driver task manager

Bug #1221486 reported by Kaiwei Fan
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Kaiwei Fan

Bug Description

When stopping vcns driver task manager, an exception is raised:

Traceback (most recent call last):
  File "neutron/plugins/nicira/vshield/tasks/tasks.py", line 389, in _loopingcall_callback
    self._check_pending_tasks()
  File "neutron/plugins/nicira/vshield/tasks/tasks.py", line 236, in _check_pending_tasks
    task = tasks[0]
TypeError: 'NoneType' object has no attribute '__getitem__'
2013-09-05 17:13:06,191 WARNING [neutron.openstack.common.loopingcall] task run outlasted interval by 0.000176 sec

Tags: nicira
Kaiwei Fan (kaiwei-fan)
Changed in neutron:
assignee: nobody → Kaiwei Fan (kaiwei-fan)
Revision history for this message
Salvatore Orlando (salvatore-orlando) wrote :

if you can mock looping call in ut - or stop it on teardown/cleanup

Changed in neutron:
milestone: none → havana-rc1
importance: Undecided → Medium
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/45362

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

Reviewed: https://review.openstack.org/45362
Committed: http://github.com/openstack/neutron/commit/fc0e7cd5ab01cb54ba7f2696e15c49e1fb827bc7
Submitter: Jenkins
Branch: master

commit fc0e7cd5ab01cb54ba7f2696e15c49e1fb827bc7
Author: Kaiwei Fan <email address hidden>
Date: Thu Sep 5 13:57:13 2013 -0700

    Fix IF checks on spawned green thread instance

    Initially the symptom looks like race condition between two threads when
    stopping the task manager. After further analysis/troubleshooting, it
    turns out that two threads are spawned if a task manager is stopped and
    started again, causing unexpected errors.

    The IF check on the spawned thread sometimes return True sometime return False
    if not compared against None explicitly. This makes start() method
    think no thread has been started or stop() method think no thread is started.
    Change the check to compare against None.

    Also fixed a problem in unit-test where a thread may never terminated when
    a stop call is invoked during db access.

    Closes-Bug: 1221486
    Change-Id: I0d67bfe8fef7a390f0d6bc0f5a42835f86a9fb27

Changed in neutron:
status: In Progress → Fix Committed
tags: added: nicira
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: havana-rc1 → 2013.2
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.