[openstack-dev] [Neutron][LBaaS] Error at context exit for subnet in unit test case

Brandon Logan brandon.logan at RACKSPACE.COM
Wed Aug 20 15:54:02 UTC 2014


Hey Vijay,
Figured out the issue you are having.  In that particular test you are
creating the same subnet twice.  The first time you create it is in the
contextlib.nested, the second time is the self.loadbalancer method that
will create a subnet if you do not pass it.  So you should pass
subnet=subnet in the self.loadbalancer method.

After that there are other minor issues in the driver, mainly accessing
the obj passed in as a dictionary and not an object (obj["id"] vs
obj.id).

Let me know if you need more information.

Thanks,
Brandon
On Wed, 2014-08-20 at 14:27 +0000, Vijay Venkatachalam wrote:
> I observed the following text as well "One or more ports have an IP allocation from this subnet."
> Looks like loadbalancer context exit at "blah2" is not cleaning up the port that was created. 
> This ultimately resulted in failure of delete subnet at "blah3".
> 
> ----------------------
> with self.subnet() as subnet:
>     blah1
>     with self.loadbalancer() as lb:
>         blah2
>     blah3
> ----------------------
> 
> -----Original Message-----
> From: Vijay Venkatachalam [mailto:Vijay.Venkatachalam at citrix.com] 
> Sent: 20 August 2014 19:12
> To: OpenStack Development Mailing List (openstack-dev at lists.openstack.org)
> Subject: [openstack-dev] [Neutron][LBaaS] Error at context exit for subnet in unit test case
> 
> Hi,
> 
> I am writing a unit testcase with context as subnet, code here [1]. 
> When the context exits a delete of subnet is attempted and I am getting a MismatchError . Traceback posted here [2]. 
> 
> What could be going wrong here?
> 
> Testcase is written like the following
> ----------------------
> with self.subnet() as subnet:
>     blah1
>     blah2
>     blah3
> ----------------------
> 
> I am getting a "MismatchError: 409 != 204" error at blah3 when context exits.
> 
> [1] UnitTestCase Snippet - http://pastebin.com/rMtf2dQX [2] Traceback  - http://pastebin.com/2sPcZ8Jk
> 
> 
> Thanks,
> Vijay V.
> 
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
> 
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list