<br><br><div class="gmail_quote">On Fri, Mar 8, 2013 at 1:07 AM, Michael J Fork <span dir="ltr"><<a href="mailto:mjfork@us.ibm.com" target="_blank">mjfork@us.ibm.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<p><font face="sans-serif">After updating the Cinder oslo rpc libraries to the latest (see <a href="https://review.openstack.org/#/c/23822/" target="_blank">https://review.openstack.org/#/c/23822/</a>), Cinder test_preattach_status_volume fails with the following:</font><br>
<br>
<font face="sans-serif">======================================================================</font><br>
<font face="sans-serif">FAIL: Ensure volume goes into pre-attaching state</font><br>
<font face="sans-serif">----------------------------------------------------------------------</font><br>
<font face="sans-serif">Traceback (most recent call last):</font><br>
<font face="sans-serif"> File "/mnt/home/openstack/dev/cinder/cinder/tests/test_volume.py", line 308, in test_preattach_status_volume</font><br>
<font face="sans-serif"> self.assertEqual(vol['status'], "available")</font><br>
<br>
<font face="sans-serif">and the test</font><br>
<br>
<font face="sans-serif"> def test_preattach_status_volume(self):</font><br>
<font face="sans-serif"> """Ensure volume goes into pre-attaching state"""</font><br>
<font face="sans-serif"> instance_uuid = '12345678-1234-5678-1234-567812345678'</font><br>
<font face="sans-serif"> mountpoint = "/dev/sdf"</font><br>
<font face="sans-serif"> volume = db.volume_create(self.context, {'size': 1,</font><br>
<font face="sans-serif"> 'status': 'available'})</font><br>
<font face="sans-serif"> volume_id = volume['id']</font><br>
<br>
<font face="sans-serif"> volume_api = cinder.volume.api.API()</font><br>
<font face="sans-serif"> volume_api.attach(self.context, volume, instance_uuid, mountpoint)</font><br>
<br>
<font face="sans-serif"> vol = db.volume_get(self.context, volume_id)</font><br>
<font face="sans-serif"> self.assertEqual(vol['status'], "available")</font><br>
<font face="sans-serif"> self.assertEqual(vol['attach_status'], None)</font><br>
<font face="sans-serif"> self.assertEqual(vol['instance_uuid'], None)</font><br>
<font face="sans-serif"><br>
I would expect volume_api.attach call to set the state to "in-use" (as the error shows it was) vs still being "available". Is this a legitimate bug that needs fixed or is the error caused by something in the oslo update?</font><br>
<br>
<font face="sans-serif">Thanks.</font><br>
<font face="sans-serif"><br>
Michael<br>
<br>
-------------------------------------------------<br>
Michael Fork<br>
Architect, OpenStack Development<br>
IBM Systems & Technology Group</font></p></div><br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div>There's a bug in here (although I suspect it's a bug in the unit test code), just haven't figured out how the oslo change exposed it. The status should be "in-use" as you pointed out, if you run the test individually or even just test_volume:VolumeTestCase, it passes. So there's something wonky in the test setup somewhere.