<div dir="ltr"><div><span style="font-family:monospace,monospace">I was able to narrow down to the scenario where it fails only when i do:<br><br>./run_tests.sh -N cinder.tests.unit.test_remotefs cinder.tests.unit.test_volume.VolumeTestCase<br><br></span></div><div><span style="font-family:monospace,monospace">and fails with:<br>{0} cinder.tests.unit.test_volume.VolumeTestCase.test_can_delete_errored_snapshot [0.507361s] ... FAILED<br><br>Captured traceback:<br>~~~~~~~~~~~~~~~~~~~<br>    Traceback (most recent call last):<br>      File "cinder/tests/unit/test_volume.py", line 3029, in test_can_delete_errored_snapshot<br>        snapshot_obj = objects.Snapshot.get_by_id(self.context, snapshot_id)<br>      File "/usr/lib/python2.7/site-packages/oslo_versionedobjects/base.py", line 169, in wrapper<br>        result = fn(cls, context, *args, **kwargs)<br>      File "cinder/objects/snapshot.py", line 130, in get_by_id<br>        expected_attrs=['metadata'])<br>      File "cinder/objects/snapshot.py", line 112, in _from_db_object<br>        snapshot[name] = value<br>      File "/usr/lib/python2.7/site-packages/oslo_versionedobjects/base.py", line 691, in __setitem__<br>        setattr(self, name, value)<br>      File "/usr/lib/python2.7/site-packages/oslo_versionedobjects/base.py", line 70, in setter<br>        field_value = field.coerce(self, name, value)<br>      File "/usr/lib/python2.7/site-packages/oslo_versionedobjects/fields.py", line 183, in coerce<br>        return self._null(obj, attr)<br>      File "/usr/lib/python2.7/site-packages/oslo_versionedobjects/fields.py", line 161, in _null<br>        raise ValueError(_("Field `%s' cannot be None") % attr)<br>    ValueError: Field `volume_id' cannot be None<br></span></div><div><span style="font-family:monospace,monospace"><br></span></div><div><span style="font-family:monospace,monospace">Both the testsuites run fine when i run them individually, as in the below is success:<br><br>./run_tests.sh -N cinder.tests.unit.test_remotefs - no errors<br><br>./run_tests.sh -N cinder.tests.unit.test_volume.VolumeTestCase - no errors<br><br></span></div><div><span style="font-family:monospace,monospace">So i modified my patch @ <a href="https://review.openstack.org/#/c/172808/">https://review.openstack.org/#/c/172808/</a> (Patch set 6) and <br>removed all testcase i added in test_remotefs.py except one, so that we have lesser code to debug/deal with!<br><br></span></div><div><span style="font-family:monospace,monospace">See <a href="https://review.openstack.org/#/c/172808/6/cinder/tests/unit/test_remotefs.py">https://review.openstack.org/#/c/172808/6/cinder/tests/unit/test_remotefs.py</a><br><br></span></div><div><span style="font-family:monospace,monospace">Now when i disable <span class="">test_create_snapshot_online_success then running both the suites work, <br>but when i enable </span><span class="">test_create_snapshot_online_success then it fails as above.<br><br></span></span></div><div><span style="font-family:monospace,monospace"><span class="">I am unable to figure whats the connection between </span><span class="">test_create_snapshot_online_success in test_remotefs.py <br>and </span>VolumeTestCase.test_can_delete_errored_snapshot in test_volume.py failure<br><br></span></div><div><span style="font-family:monospace,monospace">Can someone help here ?<br><br></span></div><div><span style="font-family:monospace,monospace">thanx,<br></span></div><div><span style="font-family:monospace,monospace">deepak<br><br></span></div><div><span style="font-family:monospace,monospace"><br></span></div><div class="gmail_extra"><span style="font-family:monospace,monospace"><br></span><div class="gmail_quote"><span style="font-family:monospace,monospace">On Thu, Jun 4, 2015 at 1:37 PM, Deepak Shetty <span dir="ltr"><<a href="mailto:dpkshetty@gmail.com" target="_blank">dpkshetty@gmail.com</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><span style="font-family:monospace,monospace">Hi Thang,<br></span></div><span style="font-family:monospace,monospace">  Since you are working on Snapshot Objects, any idea on why the testcase when run all by itself, works, but when run as part of the overall suite, fails ?<br></span></div><span style="font-family:monospace,monospace">This seems to be related to the Snapshot Objects, hence Ccing you.<br></span></div><div class=""><div class="h5"><div class="gmail_extra"><span style="font-family:monospace,monospace"><br></span><div class="gmail_quote"><span style="font-family:monospace,monospace">On Wed, Jun 3, 2015 at 9:54 PM, Deepak Shetty <span dir="ltr"><<a href="mailto:dpkshetty@gmail.com" target="_blank">dpkshetty@gmail.com</a>></span> wrote:<br></span><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div><div><div><div><div><div><div><div><span style="font-family:monospace,monospace">Hi All,<br></span></div><span style="font-family:monospace,monospace">  I am hitting a strange issue when running Cinder unit tests against my patch @<br><a href="https://review.openstack.org/#/c/172808/5" target="_blank">https://review.openstack.org/#/c/172808/5</a><br><br></span></div><div><span style="font-family:monospace,monospace">I have spent 1 day and haven't been successfull at figuring how/why my patch is causing it!<br></span></div><div><span style="font-family:monospace,monospace"><br>All tests failing are part of VolumeTestCase suite and from the error (see below) it seems<br></span></div><div><span style="font-family:monospace,monospace">the Snapshot Object is complaining that 'volume_id' field is null (while it shouldn't be)<br></span></div><div><span style="font-family:monospace,monospace"><br></span></div><span style="font-family:monospace,monospace">An example error from the associated Jenkins run can be seen @<br><a href="http://logs.openstack.org/08/172808/5/check/gate-cinder-python27/0abd15e/console.html.gz#_2015-05-22_13_28_47_140" target="_blank">http://logs.openstack.org/08/172808/5/check/gate-cinder-python27/0abd15e/console.html.gz#_2015-05-22_13_28_47_140</a><br><br></span></div><span style="font-family:monospace,monospace">I am seeing a total of 21 such errors.<br><br></span></div><span style="font-family:monospace,monospace">Its strange because, when I try to reproduce it locally in my devstack env, I see the below:<br><br></span></div><span style="font-family:monospace,monospace">1) When i just run: ./run_tests.sh -N cinder.tests.unit.test_volume.</span><span style="font-family:monospace,monospace">VolumeTestCase<br></span></div><span style="font-family:monospace,monospace">all testcases pass<br><br></span></div><span style="font-family:monospace,monospace">2) When i run 1 individual testcase: ./run_tests.sh -N  cinder.tests.unit.test_volume.</span><span style="font-family:monospace,monospace">VolumeTestCase.test_delete_</span><span style="font-family:monospace,monospace">busy_snapshot<br></span></div><span style="font-family:monospace,monospace">that passes too<br><br></span></div><span style="font-family:monospace,monospace">3) When i run : ./run_tests.sh -N<br></span></div><span style="font-family:monospace,monospace">I see 21 tests failing and all are failing with error similar to the below<br><br>{0} cinder.tests.unit.test_volume.</span><span style="font-family:monospace,monospace">VolumeTestCase.test_delete_</span><span style="font-family:monospace,monospace">busy_snapshot [0.537366s] ... FAILED<br><br>Captured traceback:<br>~~~~~~~~~~~~~~~~~~~<br>    Traceback (most recent call last):<br>      File "cinder/tests/unit/test_</span><span style="font-family:monospace,monospace">volume.py", line 3219, in test_delete_busy_snapshot<br>        snapshot_obj = objects.Snapshot.get_by_id(</span><span style="font-family:monospace,monospace">self.context, snapshot_id)<br>      File "/usr/lib/python2.7/site-</span><span style="font-family:monospace,monospace">packages/oslo_</span><span style="font-family:monospace,monospace">versionedobjects/base.py", line 163, in wrapper<br>        result = fn(cls, context, *args, **kwargs)<br>      File "cinder/objects/snapshot.py", line 130, in get_by_id<br>        expected_attrs=['metadata'])<br>      File "cinder/objects/snapshot.py", line 112, in _from_db_object<br>        snapshot[name] = value<br>      File "/usr/lib/python2.7/site-</span><span style="font-family:monospace,monospace">packages/oslo_</span><span style="font-family:monospace,monospace">versionedobjects/base.py", line 675, in __setitem__<br>        setattr(self, name, value)<br>      File "/usr/lib/python2.7/site-</span><span style="font-family:monospace,monospace">packages/oslo_</span><span style="font-family:monospace,monospace">versionedobjects/base.py", line 70, in setter<br>        field_value = field.coerce(self, name, value)<br>      File "/usr/lib/python2.7/site-</span><span style="font-family:monospace,monospace">packages/oslo_</span><span style="font-family:monospace,monospace">versionedobjects/fields.py", line 182, in coerce<br>        return self._null(obj, attr)<br>      File "/usr/lib/python2.7/site-</span><span style="font-family:monospace,monospace">packages/oslo_</span><span style="font-family:monospace,monospace">versionedobjects/fields.py", line 160, in _null<br>        raise ValueError(_("Field `%s' cannot be None") % attr)<br>    ValueError: Field `volume_id' cannot be None<br><br></span></div><span style="font-family:monospace,monospace">Any suggestions / thoughts on why this could be happening ?<br><br></span></div><span style="font-family:monospace,monospace">thanx,<br></span></div><span style="font-family:monospace,monospace">deepak<br></span></div>
</blockquote></div><span style="font-family:monospace,monospace"><br></span></div>
</div></div></blockquote></div><span style="font-family:monospace,monospace"><br></span></div></div>