<font face="arial" size="2"><p style="margin:0;padding:0;font-family: arial; font-size: 10pt;">Hi Jay,</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt;"> </p>
<p style="margin:0;padding:0;">
<p style="margin:0;padding:0;"><span style="font-family: arial; font-size: 10pt;">The tests should not be running concurrently.</span></p>
<p style="margin:0;padding:0;"> </p>
<p style="margin:0;padding:0;"><span style="font-family: arial; font-size: 10pt;">We currently have 4 Natty Cloud Servers configured as unit test workers. The machines are shared between nova/glance/keystone.</span></p>
<p style="margin:0;padding:0;"> </p>
<p style="margin:0;padding:0;"><span style="font-family: arial; font-size: 10pt;">The unit test runner is pretty simple:</span></p>
<p style="margin:0;padding:0;"> </p>
<p style="margin:0;padding:0;"><span style="font-family: arial; font-size: 10pt;">https://github.com/dprince/smokestack/blob/master/app/templates/unittest_runner.sh.erb</span></p>
</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt;">Would using a unique FAKE_FILESYSTEM_ROOTDIR for each test run or test help out here? Perhaps prefixing each one w/ /tmp/glance-tests so that we could also add an explicit tmp dir cleanup command in the test suite runners as well.</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt;">In the meantime I'm happy to add an explicit cleanup for /tmp/glance-tests to make sure we have a clean slate for each test run.</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt;">Dan</p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt;"> </p>
<p style="margin:0;padding:0;font-family: arial; font-size: 10pt;">-----Original Message-----<br />From: "Jay Pipes" <jaypipes@gmail.com><br />Sent: Tuesday, December 13, 2011 7:14am<br />To: "Dan Prince" <dan.prince@rackspace.com><br />Cc: "Openstack" <openstack@lists.launchpad.net><br />Subject: Re: [Openstack] unit and integration tests results for Gerrit</p>
<div id="SafeStyles1323789701" style="font-family: arial; font-size: 10pt;">
<p style="margin:0;padding:0;"><br />Thanks Dan, looks like a great start on this. Not sure what's going on<br />with the unit test runs in Glance, though... As an example, see:<br /><br />http://smokestack.openstack.org/?go=/jobs/5600<br /><br />There are dozens of errors like this:<br /><br />======================================================================<br />ERROR: test_add_member (glance.tests.unit.test_api.TestGlanceAPI)<br />----------------------------------------------------------------------<br />Traceback (most recent call last):<br /> File "/tmp/tmp.ZaWdEoPfhP/glance_source/glance/tests/unit/test_api.py",<br />line 1937, in setUp<br /> stubs.stub_out_filesystem_backend()<br /> File "/tmp/tmp.ZaWdEoPfhP/glance_source/glance/tests/stubs.py", line<br />63, in stub_out_filesystem_backend<br /> os.mkdir(FAKE_FILESYSTEM_ROOTDIR)<br />OSError: [Errno 17] File exists: '/tmp/glance-tests'<br /><br />That FAKE_FILESYSTEM_ROOTDIR is cleaned up in the tearDown() method of<br />API unit tests, and these tests run perfectly fine for me locally. I<br />was thinking that one of the following things may be occurring:<br /><br />* The unlink() of the FAKE_FILESYSTEM_ROOTDIR is not fsync'ing fast<br />enough, resulting in setUp()'s call to create the /tmp/glance-tests<br />directory is stumbling over itself<br />* The tests are being run in parallel somehow?<br /><br />I've seen the fsync behaviour cause havoc in some of the image cache<br />tests before, and the solution ended up putting a small wait loop in<br />the test code to wait until disk buffers were flushed and a cache file<br />was fully removed from the filesystem. That may be happening here?<br />These are being run on Cloud Servers, right?<br /><br />/me just trying to figure out why tests would run differently in<br />smokestack than Jenkins or locally...<br /><br />Thanks in advance for any insight.<br /><br />Cheers,<br />-jay</p>
</div></font>