Since bug #1035426 was fixed, the CacheConcurrencyTestCase unit tests can fail with an exception like this:
Traceback (most recent call last):
File "/home/johannes/virtualenvs/nova/lib/python2.6/site-packages/eventlet/hubs/hub.py", line 336, in fire_timers
timer()
File "/home/johannes/virtualenvs/nova/lib/python2.6/site-packages/eventlet/hubs/timer.py", line 56, in __call__
cb(*args, **kw)
File "/home/johannes/virtualenvs/nova/lib/python2.6/site-packages/eventlet/greenthread.py", line 192, in main
result = function(*args, **kwargs)
File "/home/johannes/openstack/nova/ohthree/nova/virt/libvirt/imagebackend.py", line 126, in cache
*args, **kwargs)
File "/home/johannes/openstack/nova/ohthree/nova/virt/libvirt/imagebackend.py", line 146, in create_image
prepare_template(target=self.path, *args, **kwargs)
File "/home/johannes/openstack/nova/ohthree/nova/utils.py", line 732, in inner
ensure_tree(local_lock_path)
File "/home/johannes/openstack/nova/ohthree/nova/utils.py", line 1305, in ensure_tree
os.makedirs(path)
File "/home/johannes/virtualenvs/nova/lib/python2.6/os.py", line 150, in makedirs
makedirs(head, mode)
File "/home/johannes/virtualenvs/nova/lib/python2.6/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 2] No such file or directory: 'nova.compute.manager'
It can also fail with similar exceptions in shutil.rmtree().
This is caused by a race condition in the unit test. Two greenthreads are spawned, and the changes to fix bug #1035426 will cause a race between the two threads either creating or deleting the tree.
An unrelated bug will cause the unit test to pass even if the above race condition and exception occur. This is because the greenthreads being tested are never waited on, causing the exceptions to be ignored.
Since bug #1035426 was fixed, the CacheConcurrenc yTestCase unit tests can fail with an exception like this:
Traceback (most recent call last): johannes/ virtualenvs/ nova/lib/ python2. 6/site- packages/ eventlet/ hubs/hub. py", line 336, in fire_timers johannes/ virtualenvs/ nova/lib/ python2. 6/site- packages/ eventlet/ hubs/timer. py", line 56, in __call__ johannes/ virtualenvs/ nova/lib/ python2. 6/site- packages/ eventlet/ greenthread. py", line 192, in main johannes/ openstack/ nova/ohthree/ nova/virt/ libvirt/ imagebackend. py", line 126, in cache johannes/ openstack/ nova/ohthree/ nova/virt/ libvirt/ imagebackend. py", line 146, in create_image template( target= self.path, *args, **kwargs) johannes/ openstack/ nova/ohthree/ nova/utils. py", line 732, in inner tree(local_ lock_path) johannes/ openstack/ nova/ohthree/ nova/utils. py", line 1305, in ensure_tree makedirs( path) johannes/ virtualenvs/ nova/lib/ python2. 6/os.py" , line 150, in makedirs johannes/ virtualenvs/ nova/lib/ python2. 6/os.py" , line 157, in makedirs manager'
File "/home/
timer()
File "/home/
cb(*args, **kw)
File "/home/
result = function(*args, **kwargs)
File "/home/
*args, **kwargs)
File "/home/
prepare_
File "/home/
ensure_
File "/home/
os.
File "/home/
makedirs(head, mode)
File "/home/
mkdir(name, mode)
OSError: [Errno 2] No such file or directory: 'nova.compute.
It can also fail with similar exceptions in shutil.rmtree().
This is caused by a race condition in the unit test. Two greenthreads are spawned, and the changes to fix bug #1035426 will cause a race between the two threads either creating or deleting the tree.
An unrelated bug will cause the unit test to pass even if the above race condition and exception occur. This is because the greenthreads being tested are never waited on, causing the exceptions to be ignored.